View Single Post
  #6 (permalink)  
Old 04-30-2008, 08:27 PM
niggles niggles is offline
WebProWorld Member
 

Join Date: Oct 2005
Posts: 31
niggles RepRank 1
Default Re: Can I stop spammers filling in my form?

I agree with imvain2 -> the invisible field is a really simple and great way to check if it's a SPAMBOT or human without impacting on your customer.

All you need to do is write code which says :
Code:
<?php


if(!empty($_POST["myemail"]){

     $spam = true;
} else {

    $spam = false; 
}

?>
Then just before you send off the email message you check whether it's true or false and if it's true, don't send the email :

Code:
if(!$spam){

     // send your email

}
__________________
-------------------------------------------------
World Music World - bringing the World's Folk Music Cultures Together
http://www.worldmusicworld.com/
-------------------------------------------------
Reply With Quote