basic php login script failing
<p>am creating a simple php login script and testing it in firefox before uploading the server but to my suprise it fails each time.<br>
//index.php</p>

<pre><code>&lt;form name="form1" method="post" action="checklogin.php"&gt;
    username&lt;input name="myusername" type="text" id="myusername"&gt;
    password&lt;input name="mypassword" type="password" id="mypassword"&gt;
    &lt;input type="submit" name="Submit" value="Login"&gt;
&lt;/form&gt;
</code></pre>

<p><br>
//checklogin.php</p>

<pre><code>&lt;?php
// username and password sent from form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword']; 
if($myusername==='stackoverflow')
{
    if($mypassword==='stackoverflow')
    {
        session_register("myusername");
        session_register("mypassword");
        header("location:login_success.php");
    }
}

else echo ("&lt;h2&gt;wrong username or password&lt;/h2&gt;&lt;br&gt;&lt;a href='index.php'&gt;click here to try again&lt;/a&gt;");
?&gt;
</code></pre>

<p><br>
when i drop the index.php script into firefox 4 and type username and password it always shows <code>wrong username or password</code>. I thought this script was basic but it still eludes me. Please help.</p>
