Trying to implement a login form and keep getting this error when I try it out.
Parse error: syntax error, unexpected '=' in C:\xampp\htdocs\Assignment2\checkLogin.php on line 34
Looking through the code, I can't see anything obvious.
The error is pointing to the SQL query but not quite sure what's up with it?
$conn = mysqli_connect($db_server, $db_serverUname, $db_serverPwd, $database);
if (mysqli_connect_errno())
{
print("Error connecting to MySQL database". mysqli_connect_error());
}else {
$SQL_Query = "SELECT * FROM 'login' WHERE 'username' = '".$username."'" AND 'password' = '".$password."'"";
$result = mysqli_query($conn, $SQL_Query);
header("index.html");
$result = mysqli_query($conn, $SQL_Query);
$num_rows = mysqli_num_rows($result);
Aucun commentaire:
Enregistrer un commentaire