Email Address Validation Function PHP Code Form HTML Check Correct Valid
Email Address Validation Function PHP Code Form HTML Check Correct Valid
Email Address Validation Function PHP Code Form HTML Check Correct Valid
Post Description:
Post Tags: email, address, validation, function, php, code, form, html, check, correct, valid
This Post Has Been Viewed 625 Times Since Thu Jun 21, 2007 6:04 pm Posted By pack with 1 replies
Post Description:
Post Tags: email, address, validation, function, php, code, form, html, check, correct, valid
This Post Has Been Viewed 625 Times Since Thu Jun 21, 2007 6:04 pm Posted By pack with 1 replies
| Email Address Validation Function PHP Code Form HTML Check Correct Valid |
im writing a script with a form and i want to write a piece of code that will check for a valid email address using php programming, but i am not very familiar with the syntax, i was wondering if you guys can help me figure out how i can write a snippet of a function which verifies and confirms that the email address entered by a user on an HTML form is correct and valid. so basically i need a PHP email vadliation function i can use.
Leave Your Comments [ dejar commentarios ]
Comments and replies About Email Address Validation Function PHP Code Form HTML Check Correct Valid
:: 1 :: #7650 - Reply By wahoo On Thu Jun 21, 2007 6:09 pm
try this function:
CODE:
CODE:
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;
}
$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;
}

