Hi,
I am a newbie with PHP/MySQL.I am trying to work on a Login Script for a while.It is not going to else part even with a valid user?
Any help please?
Thanks!
---------------------------Login Script-------------------------------------
$db = mysql_connect(“localhost”, “root”, “”);
mysql_select_db(“podb”,$db);
$result = mysql_query(“SELECT * FROM users WHERE
user= ‘user’ AND pass= ‘pass’”,$db)
or die(“Couldn’t query the user-database.”);
$num = mysql_num_rows($result);
if ($num == “0”) //login failed
{
include(‘Warehouse_login.htm’);
exit;
}
else
{
echo “Logged in Successfully!”;
}