PHP email validation function script snippet check correct emails
RegisterLogin
PHP email validation function script snippet check correct emails
Post Description: PHP email validation function script snippet check correct emails
Tags: PHP, email, validation, function, script, snippet, check, correct, emails
This Post Was Posted On Feb 29, 2008 By web hosting #1894
Post Description: PHP email validation function script snippet check correct emails
Tags: PHP, email, validation, function, script, snippet, check, correct, emails
This Post Was Posted On Feb 29, 2008 By web hosting #1894
PHP email validation function script snippet check correct emails by web hosting
i needed a function or class to check on my user's email to verify that the emails address they were providing was correct. so here is a useful email verification function.
this function just checks that the format of the email is correct:
function check_email($email) {
$validation = TRUE;
if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$", $email)) {
$validation = FALSE;
}
return $validation;
}
hope this helps
USAGE:
if(!check_email($mail)) {
$error .= "EMAIL - The Email You Provided Is not Valid";
}
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
Max Matrix
#2127 1
great job hommie, came in just handy.
thanx.
thanx.
Mar 11, 2008 Reply Report abuse
©2011 Webune Forums - Wed Dec 21, 2011 5:04 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3