I am attempting to create a login script.
The following snippet of code:
$query = "select * from auth where username='$user name' and
password=passwo rd('$password') ";
$result = mysql_query($qu ery, $db_conn);
$num = mysql_num_rows( $result);
echo $num;
produces the following result:
Warning: mysql_num_rows( ): supplied argument is not a valid MySQL
result resource in prototype4\admi n.php on line 14
I've searched high and low and cannot find a reason why this isn't
working. I am however, a beginner to PHP, so please forgive me if
there's an obvious mistake!
Thanks in advance for any help anyone can give
The following snippet of code:
$query = "select * from auth where username='$user name' and
password=passwo rd('$password') ";
$result = mysql_query($qu ery, $db_conn);
$num = mysql_num_rows( $result);
echo $num;
produces the following result:
Warning: mysql_num_rows( ): supplied argument is not a valid MySQL
result resource in prototype4\admi n.php on line 14
I've searched high and low and cannot find a reason why this isn't
working. I am however, a beginner to PHP, so please forgive me if
there's an obvious mistake!
Thanks in advance for any help anyone can give
Comment