corrections classe Vaildation

master
Mathilde JEAN 2 years ago
parent 70e733d0b6
commit af5fea1c58

BIN
.DS_Store vendored

Binary file not shown.

@ -6,8 +6,8 @@
$dataVueEreur[] ="Nom d'utilisateur manquant"; $dataVueEreur[] ="Nom d'utilisateur manquant";
throw new Exception('pas de username'); throw new Exception('pas de username');
} }
$username = Validation::clear_string($username); $usrName = Validation::clear_string($usrName);
if($username == false){ if($usrName == false){
$dataVueEreur[] = "Sanitizing error"; $dataVueEreur[] = "Sanitizing error";
throw new Exception('sanitizing fail'); throw new Exception('sanitizing fail');
} }
@ -72,7 +72,7 @@
} }
static function clear_string($champ){ static function clear_string($champ){
return filter_var($champ, FILTER_SANITIZE_SPECIAL_VAR); return filter_var($champ, FILTER_SANITIZE_SPECIAL_CHARS);
} }
} }

@ -3,7 +3,7 @@
//Prefixe //Prefixe
$rep=__DIR__.'/../'; $rep=__DIR__.'/../';
//BD //BD
$bd['dsn'] = "mysql:host=localhost;port=8888;dbname=dbPhp"; $bd['dsn'] = "mysql:host=localhost;port=8888;dbname=bdPhp";
$bd['user'] = "root"; $bd['user'] = "root";
$bd['pswd'] = "root"; $bd['pswd'] = "root";
//Vues //Vues

Loading…
Cancel
Save