diff --git a/assets/php/user_dao.php b/assets/php/user_dao.php index 04726b3..04b64d7 100644 --- a/assets/php/user_dao.php +++ b/assets/php/user_dao.php @@ -46,7 +46,8 @@ //Returns a query to check if the user pass matches: public function selectPass($password){ - $sql = sprintf( "SELECT * FROM users WHERE passwd = '%s'", $password ); + //$sql = sprintf( "SELECT * FROM users WHERE passwd = '%s'", $password ); + $sql = sprintf( "SELECT * FROM users WHERE user = '%s' AND pass = '%s'", $username, $password); //return $sql; return $result = mysqli_query($this->mysqli, $sql) or die ('Error into query database'); @@ -67,4 +68,4 @@ } -?> \ No newline at end of file +?>