Hi,
I'm tring to write a function to check if a user has entered 'bad words' in a text field, the function kind of works but I can't seem to get it to recognize both small and large case versions of the words.
I've checked all over but can't find doc's that help.
Here is the function
function bad_word ($intext) {
$check= ereg("[a-zA-Z]bad|worse|awful", $intext);
if ($check) {
echo"bad words!";
exit;
} else { echo "very good";
}
}
any help appreciated, thanks
Nick