Ok, I am trying to get it so if preg_match see's a word in the message from the array it will show a echo. This is what I have so far:
[PHP]badwords = array("word1", "word2", "word3");
$message = $_POST['message'];
if(preg_match($ badwords, $comment))
{
echo"You posted a bad word!";
}else{
//do the rest!
}[/PHP]
Can someone sujest anyting?
[PHP]badwords = array("word1", "word2", "word3");
$message = $_POST['message'];
if(preg_match($ badwords, $comment))
{
echo"You posted a bad word!";
}else{
//do the rest!
}[/PHP]
Can someone sujest anyting?
Comment