[thelist] PHP Form Validation
Andrew Maynes
andrew at humanbehaviour.co.uk
Mon Jan 6 15:26:01 CST 2003
I have put semicolons like this
function validateEmail($email){
if (!eregi ("^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,4}$",
$email)){
return False;
}
else {
return true;
}
}
if(!validateEmail($email)){
$error_messageSender = 'the sender needs a valid e-mail address';
}
if(!validateEmail($friends_email)){
$error_messageFreind = 'the freind needs a valid e-mail address';
}
yet not the error appears on the line where the next }
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Steve Lewis
Sent: Monday, January 06, 2003 20:23
To: thelist at lists.evolt.org
Subject: Re: [thelist] PHP Form Validation
Andrew Maynes wrote:
> if(!validateEmail($sendermail)){
> $error_messageSender = 'the sender needs a valid e-mail address'
>
> } // this produces an error
semicolon ;
More information about the thelist
mailing list