while(!feof($newfile))
{
$duplicate = fgets($newfile, 255);
// is email address submitted already in the file?
$dupe = eregi($email, $duplicate);
if($dupe == TRUE)
{
$content = "Our records show that this email address is already registered";
fclose($newfile);
//exit;
die("$front\n$content\n$back");
}
}
that works fine but
PHP Code:
while(!feof($newfile))
{
$duplicate = fgets($newfile, 255);
// is email address submitted already in the file?
$dupe = strpos($email, $duplicate);
if($dupe == TRUE)
{
$content = "Our records show that this email address is already registered";
fclose($newfile);
//exit;
die("$front\n$content\n$back");
}
}