submitted by: Guest
PHP: email validation, simple
Validate an email address - returns TRUE or FALSE. Checks format only, does not use any networking functions to verify the account actually exists.
code snippet:
<?php
// email validation function
function email_valid ($email) {
if (eregi("^[a-z0-9._-]+@[a-z0-9._-]+.[a-z]{2,6}$", $email))
{ return TRUE; } else { return FALSE; }
}
?>



