PHP Login Script! Help!!!!

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!”;
}


Their is no need to double post topics.

Unless I am mistaken and replied to a ghost topic, it seems he posted it THREE times.

Shesh, I wonder if he is afraid we wont see it, or what?

Sponsor our Newsletter | Privacy Policy | Terms of Service