Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts

    How to check field contents ??

    Hi,

    I am getting to much span in my contact form and want to
    filter out any messages with a link in them.

    I have written this code:

    PHP Code:
    // Test for link in message.
    if($Db_mess  ) {
        
    $err_msg "Please do not use links in message."
        
    require_once ("contact_fm.php");
        exit;
        }  
    // endif 
    I would like to know what test I can use to find
    this :[B] [url=[/B]

    This is always found in the spam messages.

    Thanks for any help.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #2
    Regular Coder patryk's Avatar
    Join Date
    Oct 2012
    Location
    /dev/couch
    Posts
    398
    Thanks
    2
    Thanked 64 Times in 64 Posts

  • #3
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts
    So this should work then ...

    [PHP]

    if (preg_match("[url=", $Db_mess)) { // Test for link in message.
    $err_msg = "Please do not use links in message."
    require_once ("contact_fm.php");
    exit;
    } // endif
    [/PHP]

    Thanks for the help.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •