02-15-2010, 07:36 AM
02-15-2010, 02:41 PM
Easy way is with a regex expression and preg_match, e.g.
but not 100%
Code:
if(!preg_match("/^[A-Z0-9._%-+]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z]{2,6}$/i", $email)) {
// address doesn't match format
}but not 100%