fork download
  1. <?php
  2. if (VerifierAdresseMail("test@email.com"))
  3. echo '<p>valide.</p>';
  4. else
  5. echo '<p>not valid</p>';
  6.  
  7.  
  8. function VerifierAdresseMail($adresse) {
  9. $Syntaxe = '#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#';
  10. if (preg_match($Syntaxe, $adresse))
  11. return true;
  12. else
  13. return false;
  14. }
  15. ?>
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
<p>valide.</p>