zorro
01-23-2004, 10:06 PM
I have the below code writing the email address (from a form) to a file.
How do I skip this step if the email address already exists?
# WRITE EMAIL ONLY TO CSV
if ($send_type == 'csv' or $send_type == 'emailcsv')
{
$content = "$EmailAddress\n";
@ $write = fopen($csvfile_email,'a');
if (!$write and $senderrors == 'yes')
@mail($recipient,"Form Error",$msg['csverr'],"From: \"Notifier\" <Notifier@domain.com>");
@ flock($write,LOCK_EX);
@ fwrite($write,$content);
@ flock($write,LOCK_UN);
@ fclose($write);
} // end $csvfile_email
Thank anyone for helping!
How do I skip this step if the email address already exists?
# WRITE EMAIL ONLY TO CSV
if ($send_type == 'csv' or $send_type == 'emailcsv')
{
$content = "$EmailAddress\n";
@ $write = fopen($csvfile_email,'a');
if (!$write and $senderrors == 'yes')
@mail($recipient,"Form Error",$msg['csverr'],"From: \"Notifier\" <Notifier@domain.com>");
@ flock($write,LOCK_EX);
@ fwrite($write,$content);
@ flock($write,LOCK_UN);
@ fclose($write);
} // end $csvfile_email
Thank anyone for helping!