PHP Login Script! Help!!!!


#1

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



#2

Their is no need to double post topics.


#3

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


#4

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