Banner

Monday, 2 February 2015

How to fix ‘Function eregi() is deprecated’ in PHP 5.3.0?

if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $str)) {
    $msg = 'email is not valid';
}
else {
$valid = true;
}

No comments:

Post a Comment