php login behaving strangely
<p>The login works as a typical login should, the problem is that you can ONLY put in the username and it will log you in. Pretty much if the username is correct then the password doesnt even matter.</p>

<p>php</p>

<pre><code>&lt;?php
include 'password.php'; 

session_start();
if (!isset($_SESSION['loggedIn'])) {
    $_SESSION['loggedIn'] = false;
}

if (isset($_POST['password']) &amp;&amp; isset($_POST['user'])) {
    if (sha1($_POST['password'] == $password) &amp;&amp; sha1($_POST['user']) == $user) {
        $_SESSION['loggedIn'] = true;
    } else {
        $error_msg = "Incorrect Login!";
    }
} 

if (!$_SESSION['loggedIn']): ?&gt;
</code></pre>
