title: php redirect when wrong password
body: <p>is this right the code will redirect a person to the login page when they try to access it using without going into the login page</p>
  
  <pre><code>&lt;?php
  
  $pass = 'password';
  
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php 
  
  if ( $_POST["pass"] == $pass){
  ?&gt;
  
  Congrats you have log in!
  
  
  &lt;?php 
  
  }else{
  
  header("Location: http://signin.com/");
  }
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>i ended up having a "Server error
  The website encountered an error while retrieving <a href="http://www.test.com" rel="nofollow">http://www.test.com</a> It may be down for maintenance or configured incorrectly."</p>