Ok,

I am now using the following code to check if there is any profanity in the 
$FirstName however it just doesn`t work when testing, I am thinking it has 
something to do with the way I`m loading the file, any better ways.

$words=file('words.txt');
$done=false;
while ((list($key, $val)=each($words)) and $done==false)
{
  $done=strpos(strtolower($FirstName), $val);
};
if (!$done==false)
{
  echo "Oops! Bad name";
}
else
{
  echo"Okay, valid name.";
};

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to