Does anyone know of a way to validate an e-mail address that was entered
and submitted from a form? I would like to trap invalid syntax.
Perhaps there exists a script that does just that?
I assume valid syntax is the following:
One or more characters before the @ sign, followed by an optional
Sorry about that last E-mail! Here is what I meant:
if (preg_match ("/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/", $emailaddress) ||
preg_match
("/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/",$emailaddr
ess))
{
print "That is a valid e-mail.BR\n";
}
else
{
print "Not a
:50 AM
Subject: [PHP] validating an e-mail address entry
Does anyone know of a way to validate an e-mail address that was entered
and submitted from a form? I would like to trap invalid syntax.
Perhaps there exists a script that does just that?
I assume valid syntax is the following:
One or mo
3 matches
Mail list logo