title: PHP $_SESSION login page
body: <pre><code>&lt;?php
  session_start();
  ?&gt;    
  
  &lt;?php    
   if($_SESSION['type'] ==='admin'){
   header("Location: admin.php");    
   }elseif{
       if($_SESSION['type'] ==='member'){
           header("Location: success.php");
   }else{
           if(isset($_SESSION['type'] == false){
           header("Location: user.php");
       }  
   ?&gt; 
  </code></pre>
  
  <p>When clicking on the account button, the first thing the page will do is check for the session cookie, it should do 1 of 3 things. First being to check if they're already logged in as an admin, if so take them to the admin page, second being if they're logged in as a member then take them to their specific page. Lastly to check if the session cookie exists at all, if it doesent then load the page. Am I incorrectly using the else statement checking for the session? I'm a little confused now.</p>
  
  <p>I also understand that this may be open to SQL injections, currently working on the basics and then security after as a sub project. </p>