title: PHP-Admin, student LogIn
body: <p>I want that when submit button is clicked, if admin has logged in the html page should redirect to admin.php page and a student has logged in, it should redirect to student.php page. There will be only 'one' id-password combination for admin(hardcoded), so I want to know if using if-else statement in a php script can I redirect to a new php script?
  Is it possible to do this using a single SUBMIT button only?</p>
  
  <pre><code>     &lt;?php
       if($_POST['username'] === 'admin' and $_POST['password'] === 'password'){
         go to admin.php;  //Admin login page
       }
      else{
      go to student.php; //Student has logged in =&gt; go to student login page
      }   
      ?&gt;
  </code></pre>