diff --git a/src/act.php b/src/act.php index 06f947b..4227157 100644 --- a/src/act.php +++ b/src/act.php @@ -34,19 +34,10 @@ switch($_POST['act']){ } //email => doit ĂȘtre valide - //only oner @ - if( - (substr_count('@',$_POST['email']) <> 1) - || (substr_count('.@',$_POST['email']) > 0) - || (substr_count('@.',$_POST['email']) > 0) - || (substr_count('..',$_POST['email']) > 0) - || (substr_count('.',$_POST['email']) == 0) - ){ + if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { $alerts.="L'email n'est pas valide\n"; } - - if($alerts <>""){ echo $alerts; }else{