When i run the following query to check username and password, it throws an error.
PHP
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' AND password='$mypassword'";
$result=mysql_query($sql);
if($result === false) {
var_dump(mysql_error());}
else {
print_r(mysql_num_rows($amn));
}
Error
[Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given]
Result of var_dump
[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 'update WHERE username='admin' AND password='123456' at line 1' (length=199)]