I'm trying to use "like" and the wild card symbol % in an "if" statement. I have members that submit messages on my site and I want to kick them out if they use certain illegal words. This is what I am trying to do. Thanks in advance for any help.
$email ="xx xxxx xx badword xxx badword_two xx xxx badword_three xx xxxx xxx ";
<?
if ($email like "%badword%" or
"%badword_two%" or
"%badword_three%" ){
echo "You are banned from this site";
exit();
}
?>