From 651e51458eb389b8f46509ec222697a1d9be7d81 Mon Sep 17 00:00:00 2001 From: gnieark Date: Fri, 4 Dec 2015 22:20:04 +0100 Subject: [PATCH] plop --- src/act.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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{