simple login php not working : <p>Created a simple login form but it doesnt seem to work.It always opens the admin page. </p>

<pre><code>$username=$_POST["username"];
$password=$_POST["password"];

if(mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'",$con)){
session_start();
$_SESSION["username"]=$username;
$_SESSION["password"]=$password;
header('location:admin.html');
}
else{
echo "Login Failed.&lt;a href=index.html&gt;Re Login&lt;/a";
}
</code></pre>

<p>Need help.And here is the html part.</p>

<pre><code> &lt;form method="post" id="loginform" action="validate.php"&gt;
&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;Username :&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" name="username"/&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;br&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;Password :&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="password" name="password"/&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;br&gt;
    &lt;tr&gt;
        &lt;td&gt;
        &lt;input type="submit" id="login" value="Log In" class="btn btn-primary"/&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="reset" id="reset" value="Reset" class="btn btn-primary"/&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>
Need the working code in 2hrs else im dommed</p>
