hi all
i am quote new to the php.
now trying create a user login page using php4 and mysql
the script successfully connect to the db.
but i am not getting any result.
can any of you sagest what am i doing wrong please.
many thanks in advance
Sharma
<?php
if (isset($password) && isset($username))
{
include("connect2db.php");
$qstr = "SELECT * from userlogin where username = '$username' and password = '$password'";
$result = mysql_query($qstr);
// check login info is correct
if (mysql_num_rows($result )) echo "Successful Login";
else echo "Failed Login";
mysql_close();
}
else echo "No login attempted";
?>