I have a problem, in a login in php I have a line of code that checks if the user and password are correct, if so, the code continues. The error is that I enter the username and password that exist in the DB and it says as if they did not exist.
$result = mysqli_query($link,"SELECT user, pass FROM usuarios WHERE user= $username AND pass= $password");
if($result && mysqli_num_rows($result) > 0)
{
// Login OK, continuar con el codigo.
}
else
{
// Introduciendo un usuario y password que existen me salta este error todo el rato.
echo 'Usuario o password no existe';
}