×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Vincenzo Flauto
Added: Jun 9, 2016 8:03 AM
Views: 2027
  1.         /**
  2.          * Controlla se un indirizzo email è valido
  3.          *
  4.          * @param string $email
  5.          * @return boolean
  6.          */
  7.         function CheckMail($email){
  8.             if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email))
  9.                 return true;
  10.             else
  11.                 return false;
  12.         }