title: Using php if statement for html login form
body: <p>I am trying to link my html login form to a php file with if statement that when is true, links to another html page. </p>
  
  <p>But when i enter username and password and hit enter , it links to php file that shows a blank page. (i am using xampp )
  The code is below:
      </p>
  
  <pre><code>&lt;form  action="init.php" method"post" class="form-signin" &gt;
    &lt;input type="text" class="form-control" name="username"       placeholder="userName" required="" autofocus="" /&gt;
    &lt;input type="passWord" class="form-control" name="password" placeholder="Password" required=""/&gt;     
  
    &lt;button class="btn btn-lg btn-primary btn-block" type="submit"&gt;Log in&lt;/button&gt;   
  &lt;/form&gt;
  </code></pre>
  
  <p>And the php file's code is:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;?php 
  if (isset($_POST["username"])){
  
  
  $username = $_POST['Username'];
  $password = $_POST['password'];
  
  if ($username =='myaccount' AND $password=='myaccount123') {
  echo '&lt;a href="student1.html"&gt;&lt;/a&gt;';
  } else if ($username =='myaccount1' AND $password=='myaccount1123') {
  echo '&lt;a href="student2.html"&gt;&lt;/a&gt;';
  }
  else {
  echo "You have not requested a login form!";
  } }
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It is for a school project so thanks in advance.</p>