i have problem my login it's not running plzzz help me
<?php
session_start();
require("dbc.php");
if(isset($_POST['submit']))
{
$username =mysql_real_escape_string( $_POST['username']);
$password =mysql_real_escape_string($_POST['password']);
if ($username && $password)
{
$connect=mysql_connect("127.0.0.1","root","") or die("couldnt connect to database");
mysql_select_db("login") or die("couldnt find database");
$query = mysql_query("SELECT * FROM `users` WHERE `username` ='$username'");
$numrows = mysql_num_rows($qurey);
if($numrows !=0)
{
while($row = mysql_fetch_assoc($qurey))
{
$dbusername = $row['username'];
$dbpassword = $row['password'];
}
if($username==$dbusername&&$pasword==$dbpassword)
{
echo "login succeful. <a href='membersarea.php'> click here to enter the member area</a>";
$_SESSION['username'] = $dbusername ;
}
else
echo "incorect password";
}
else
die ("that username dosent exist");
}
else die (" please enter the username and password");
}
?>