Is this a good ereg statement?
if
(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{1,})*\.([a-z]{2,}){1}$",$ema il_1
or $email_2))
{
unset($_GET['do']);
$message_new = "<font color='#cc0000' >$email_1 or $email_2 is not a
valid email address.
Please try again.</font>";
include("login_ form.php");
exit();
I am just trying to check if the e-mail fields _1 & _2 on the form contain
valid characters, without getting to complicated. The form I am using it in
keeps returning that I am not entering a valid e-mail address, such
"chris.bolton@n tlworld.com", or "chris@myweb.co .uk",or "chris@ntlworld .com"
not sure why this is the case?
Regards,
C.B.
if
(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{1,})*\.([a-z]{2,}){1}$",$ema il_1
or $email_2))
{
unset($_GET['do']);
$message_new = "<font color='#cc0000' >$email_1 or $email_2 is not a
valid email address.
Please try again.</font>";
include("login_ form.php");
exit();
I am just trying to check if the e-mail fields _1 & _2 on the form contain
valid characters, without getting to complicated. The form I am using it in
keeps returning that I am not entering a valid e-mail address, such
"chris.bolton@n tlworld.com", or "chris@myweb.co .uk",or "chris@ntlworld .com"
not sure why this is the case?
Regards,
C.B.
Comment