Valid email address


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function valid_email($str)
  2. {
  3. return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.