// http://scriptdemo.blogspot.ca // a simple way to check whether an email address is valid function CheckEmail($str) { $str=str_replace('#','@',$str); if (preg_match("/^[a-zA-Z]+([\._][a-zA-Z0-9]+)*@([a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}$/",$str)) { return TRUE; } else { return FALSE; } } |
Tuesday, May 22, 2012
[php] email validation function
Labels:
email,
function,
php,
validation
Subscribe to:
Post Comments (Atom)
ShowCalendar
---- | ---- | ---- | ---- | | | | | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | ---- | | | | | | ---- | | | ---- | | | | | | | | | ---- | |
No comments:
Post a Comment