Jump to content

[SOLVED] Email Form Word Filters


phpQuestioner

Recommended Posts

OK - So I keep getting this same spam email; using the same word and I have decided to try to create a script that will block email from being sent if my $comment variable contains a specific word. I think my script is kind of close, but it still is not not right just yet. I was wonder if some one could take a look at it and tell me how I could fix it to work the way I want it to. Does any one know what I need to correct in my script to make it work the way I want it to.

 

 

<?php

$comment = addslashes($_POST['comment']);

$stupidspammer=array("Website","Email","Link");

while ($commment = $stupidspammer) {

echo "We Are Not Interested";
exit;

}


// mail email stuff here


?>

Link to comment
https://forums.phpfreaks.com/topic/65487-solved-email-form-word-filters/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.