|
Posted by Cerebral Believer on 10/11/24 12:00
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}$",$email_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@ntlworld.com", or "chris@myweb.co.uk",or "chris@ntlworld.com"
not sure why this is the case?
Regards,
C.B.
Navigation:
[Reply to this message]
|