Hi,

I have some spam submissions happening on my site and I want them to stop. To do this I have decided to check for words in a string and if they match then it will not submit that data. The thing is I am not quite sure how to put this together.

I think I have the structure write or nearly write, but then using the functions to make it all work is a bit dazling to me.

PHP Code:
$stopwords "games,gambling,about";

$text "nothing about it most that most don't know which ones don and just discovered normally thinks they can make quick buck two well's not";

$wordex preg_match();

if(
$wordex)

    {

echo 
"Spam";

}else{

echo 
"No Spam";

    } 
What I want in the above script is for it to loop through the $stopwords list while trying to match the words with the $text string. If there is a match with any words in the $stopwords list then it will echo "Spam" and if there is no match it will echo "No Spam".

How can I modify my script to do that.

Thanks!