Answer the question
In order to leave comments, you need to log in
Where can be MYSQL and PHP error?
There is this line:
$query =mysql_query("SELECT * FROM usertbl WHERE username='".$username."' AND password='".$password."'");
Answer the question
In order to leave comments, you need to log in
mysql_query() returns a handle to the query result (resource), or FALSE on error .
$username = htmlspecialchars($_POST['username']);
$password = htmlspecialchars($_POST['password']);
$query = mysql_query("SELECT * FROM usertbl WHERE username='".$username."' AND `password`='".$password."'");
if (!$query) {
die('Ошибка: ' . mysql_error());
}
$numrows = mysql_num_rows($query);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question