|
Posted by bonehead on 11/16/81 11:29
Philip Ronan wrote:
> "laredotornado@zipmail.com" wrote:
>
>
>>Hello, Could someone point me to a PHP 4 function that validates that
>>an email address is of the right form?
>>
>>Thanks for your help, - Dave
>>
>
>
> This is what I use:
>
> function checkEmailSyntax($em)[snip]
dude,
very cool, probably the nicest i've seen. i'm going to test it out on
the form i'm currently building. here's the one i wrote and have been
using, just for laughs:
/*Missing or incorrectly formatted email address*/
if(empty($senderemail))
{
$errormessage.="Please Provide Your E-Mail Address<br>";
}
else if
(!eregi('^[-a-zA-Z0-9_\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$',$senderemail))
{
$errormessage.="Please Provide an E-mail Address in a Valid Format<br>";
}
[Back to original message]
|