Hey guys I've been stuck on this problem for a while, now my code seems
fine but I cant log in using the combination of 'number' and
password.....if I just use 'number' alone it logs in but if I add the query....AND palavrapass="$password";
it doesn't work. Here's my code for
you guys to take a look, maybe you can see something I cant :
if (count($errors)==0) {
$password = md5($password);
$query= " SELECT * FROM usuario WHERE numero='$numero' AND palavrapass= '$password' ";
$result= mysqli_query($db,$query);
if(mysqli_num_rows($result) ==1)
{
$_SESSION['nome'] = $nome;
$_SESSION['ultimonome'] = $ultimonome;
$_SESSION['numero'] = $numero;
header('location: pindex.php');
}
else{
array_push($errors, "combinação incorreta de número / senha");
}
}