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";
throw new Exception('pas de username');
}
$username = Validation::clear_string($username);
if($username == false){
$usrName = Validation::clear_string($usrName);
if($usrName == false){
$dataVueEreur[] = "Sanitizing error";
throw new Exception('sanitizing fail');
}
@ -72,7 +72,7 @@
}
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
$rep=__DIR__.'/../';
//BD
$bd['dsn'] = "mysql:host=localhost;port=8888;dbname=dbPhp";
$bd['dsn'] = "mysql:host=localhost;port=8888;dbname=bdPhp";
$bd['user'] = "root";
$bd['pswd'] = "root";
//Vues

Loading…
Cancel
Save