I have written a login page but each time I login it returns a blank page even with a wrong password please help:
the login page is as follows:
</head>
<body>
<div id="wrapper">
<form action="methods/login.php" method="post">
<ul>
<li><label>Username:</label><input type="text" name="username" size="10" value="<?php echo htmlentities("$username"); ?>" /></li>
<li><label>Password:</label><input type="password" name="password" size="10" value="<?php echo htmlentities("$password"); ?>" /></li>
<li><input type="submit" name="login" value="Log In" /></li>
<li><input type="submit" name="join" value="Join" />
</ul>
</form>
</div>
</body>
</html>
and the php login script is
<?php
/**
** handles the login feature of the sote
** check username and password with variables in the database
*/
require_once("../includes/ikobe.php");
if (isset($_POST['username']) &&isset($_POST['password']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$pass = sha1($password);
if (!empty($username) &&!empty($password))
{
$query = "SELECT 'id' FROM 'users' WHERE username= '$username' AND password='$pass'";
if ($query_run = mysql_query($query))
{
$query_num_row = mysql_num_rows($query_run);
if ($query_num_row==0)
{
echo 'Invalid username / password combination';
}
else if ($query_num_row==1)
{
echo 'ok.';
}
}
}
else
{
echo 'You must supply a username and password.';
}
}
?>
any help will be greatly appreciated