PHP can't find variable
<p>So Im relatively new to PHP from ASP. And After converting alot of ASP code into PHP I have come across a problem where my PHP code seems unable to find the hidden variable I have set. It worked fine in ASP and was just wondering the best way to resolve this.</p>

<p>Start of the Form:</p>

<pre><code>&lt;form name="LogIn" action="login.php" method="post"&gt;
                    &lt;td bgColor=#ffffff&gt;
                        &lt;table align="center" cellSpacing="2" cellPadding="2" border="0"&gt;
                            &lt;tr&gt;
                                &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                                &lt;td align="right"&gt;&lt;font color="#4d71a1"&gt;User name:&lt;/font&gt;&amp;nbsp;&lt;/td&gt;
                                &lt;td&gt;&lt;input name="UserName" size="25" type="Text" autocomplete="OFF"&gt;&lt;/td&gt;
                                &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                                &lt;td align="right"&gt;&lt;font color="#4d71a1"&gt;Password:&lt;/font&gt;&amp;nbsp;&lt;/td&gt;
                                &lt;td&gt;&lt;input name="Password" size="25" type="Password" autocomplete="OFF"&gt;&lt;/td&gt;
                                &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                            &lt;/tr&gt;
</code></pre>

<p>PHP script:</p>

<pre><code>&lt;? 
if ($_POST["BtnPress"]=="Pressed")
{

if ($_POST["Username"]=="*****" &amp;&amp; $_POST["password"]=="*********")
{

$_SESSION['AdminID']="1";
header("Location: "."index.php");
}
  else
{

print "&lt;font color=#ff0000&gt;Sorry you cannot access this part of the site.&lt;/font&gt;";
} 

} 
?&gt; 
</code></pre>

<p>then the rest of the form:</p>

<pre><code>&lt;tr&gt;
                                &lt;td align="center" colspan="4"&gt;
                                    &lt;input type="hidden" name="BtnPress" value="Pressed"&gt;
                                    &lt;input type="Submit" value="Log In" class="mybutton" onclick="return CheckForm();"&gt;
                                &lt;/td&gt;   
                            &lt;/tr&gt;
                        &lt;/table&gt;


                    &lt;/td&gt;
                &lt;/form&gt;
</code></pre>

<p>The PHP seems unable to find the variable BtnPress, its a similar problem throughout alot of my translated ASP to PHP script. Sorry if it is a simple solution but can anyone tell me where I am going wrong?</p>
