diff --git a/.DS_Store b/.DS_Store index fd00510..2cb8251 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/config/Validation.php b/config/Validation.php index dfad6b4..eecc2f7 100644 --- a/config/Validation.php +++ b/config/Validation.php @@ -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); } } diff --git a/config/config.php b/config/config.php index b2c1b84..e80b258 100644 --- a/config/config.php +++ b/config/config.php @@ -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