Great code to stop spam
Put this in your sending file
1 2 3 |
<input type="text" name="honeypot" style="display:none;"> |
And collect this
1 2 3 4 5 6 7 8 9 |
if( !isset($_POST['honeypot'])) { die("No Direct Access"); } // Make sure the form has actually been submitted $spam = $_POST['honeypot']; // This is our Honeypot field if($spam) { // If the Honeypot field has been filled in die("No spamming allowed "); } else |