I am trying to make a login script. This script is the one that authenticates a user when he hits submit after he has registered. I am receiving Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in line 21
Here is my code.
<?php
$currentuser =
mysql_query('select * from users where username = "" .
$POST['username'] . '" and password = "' .
$POST['password'] . '"');
if (mysql_num_rows($currentuser) != 0)
{
session_start();
session_register('authorized');
$_SESSION['authorized'] = true;
header("Location: forum.php");
exit;
}
?>
Thanks