it's giving me errors
Warning: file_get_contents() expects parameter 1 to be string
PHP Code:
$filename = "../../testfile.txt"; //above the root
$newfile = fopen($filename, "r");
if(stripos(file_get_contents($newfile), $email) !== false)
{
$content = "Our records show that this email address is already registered";
fclose($newfile);
die("$front\n$content\n$back");
}
nevermind fixed it
Quote:
Originally Posted by KirbyDE
So if you want to check if $email does occur somewhere in $duplicate:
PHP Code:
$dupe = strpost($duplicate, $email);
But as filburt1 already said, you should user stripos() if available to avoing casing issues.
|
oops but realised that and fixed it, i have no idea why they do "haystack, needle" when the saying is clearly "needle, haystack" grrr @ then, but thanks kirby