May 5, 20179 yr Hi Folks, I am using the PHP Contact Script below for one of our contact forms, however, we are getting alot of spam emails. What can i add into this code to prevent spam? <?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['offer']; $formcontent="From: $name \n Email: $email \n Offer: $message"; $recipient = "dan@definitelydomains.com"; $subject = "CookeryClubs Inquiry"; $mailheader = "From: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); echo "Thank You!"; ?> Any help would be appreciated. Dan
May 5, 20179 yr I use http://jemsmailform.com/ and it's really good for not letting spam through. Might be worth having a look at the code, if not just using it.
Create an account or sign in to comment