Forum Moderators: coopster
What i really want is validation for either a blank entry (the way I see it, just because someone is browsing the web, it doesn't mean they have got an email address), or valid email.
So far it validates the email OK, but I don't know how to set it to also accept a blank entry.
Here is the relevant code from the script:
$email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$";
if(!eregi($email_exp,$email_from)) {
$error_message .= 'The Email Address you entered does not appear to be valid.<br />';
}
All I would like to know is what do I put and where do i put it?
Thanks in advance