Hello, so I'm trying to make a simple login system with php and mysql, but it's giving error in my if. I already moved ... too much and nothing, when it seems that right it does not authenticate you put any password q or login name and will. This is my code here:
<?php
$login = $_POST['nomel'];
$senha = $_POST['senha'];
include 'conexao.php';
$busca = mysql_query("SELECT * from usuario where nm_login = '$login'");
$reg = mysql_fetch_assoc($busca);
if
($login == $reg ['nm_login']) && ($senha == $reg ['nm_senha']) {
# code...
header("location: test.html");
}
else{
echo "<center><b>Login Incorreto!</center>";
}
?>
And this is the error message:
Parse error: syntax error, unexpected '& &' (T_BOOLEAN_AND) in E: \ IMPORTANT \ USBWebserver v8.6 \ root \ NK \ autologinlogin.php on line 13 *