Update user_dao.php

This commit is contained in:
Fernando Méndez 2021-04-07 14:59:26 +02:00 committed by GitHub
parent 7fc1008c71
commit fa7acdf3e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');