see this code
<?php
$username = $_POST['username'];
$password = $_POST['password'];
if (isset($username,$password))
{
$connect = mysql_connect ("localhost","root","");
mysql_select_db("phplogin");
$query = mysql_query("SELECT * FROM `users` WHERE username ='$username' and password='$password'");
$numrows=mysql_num_rows($query);
if ($numrows!=0)
{
while($row = mysql_fetch_assoc($query))
{
$dbusername = $row ['username'];
$dbpassword = $row ['password'];
}
if ($dbusername=='username'&&$dbpassword=='password')
{
echo ("You r in");
}
else
echo ("incorrect password");
}
else
die ("that user dosen't exist");
}
else
die("please enter username and password");
?>
the problem is when we enter correct id and password it jumps to echo ("incorrect password"); where as it shall echo "you are in " if anybody can help that will be most kindness
thanks