1
Hello, then, I’m trying to make a simple login system with php and mysql, but it’s giving error in my if. I’ve moved... too much and nothing, when it seems right it does not authenticate you put any password q or login name and go. This is my code:
<?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 authenticationLogin.php on line 13*
In this post, you find a registration and login system made using PHP PDO, well explained. http://maclaine.meximas.com/post/post.php?id=40
– Maclaine