Verifying against a file

From: Date: Sat, 20 Jan 2001 19:25:41 +0000
Subject: Verifying against a file
Groups: php.general 
Request: Send a blank email to php-general+get-35832@lists.php.net to get a copy of this message
Hi, I have used the following code to open a file $fd=fopen("words.txt", "r"); $words = fread($fd, 1000000); I then convert a string which is passed in a form to this script $FirstName=strtolower("$FirstName"); And now I check to see if the lowercase version of $FirstName contains any of the words from the $words if ($FirstName=="$words") { echo "Bad"; } But it doesn`t seem to want to work, anyone give me a pointer as to where I am going wrong with this?? Ade

« previous php.general (#35832) next »