Hello! 🙂
Might I have help here please.
This is for a login check, but I get this error:
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username='test'' at line 1"
I do have this code:
<?php
$Query = "SELECT password WHERE username='$username'" or die (mysql_error());
$Result = mysql_db_query ("user_photodb", $Query, $dbh) or die (mysql_error());
if($row=mysql_fetch_array($Result))
{
setcookie("userstatus", "inside");
header ("Location: user.php");
mysql_close($dbh);
}else{
?>
Wrong user name and/or password: <A HREF="userlogin.html"><b>Back</b></A>
<?php
}
?>
Thanks,