title: session checking not performing as wanted
body: <p>I have an include to check if a session is active on all pages requiring to be logged in to access. 
  My login page works, I can access the page and it displays they username from the session on the logged in page but when I log out and try to access the logged in page with the url it lets me back in when it should not.</p>
  
  <p>Here is the security include at the top of each logged in page</p>
  
  <pre><code> &lt;?php
  
   session_start();
  
   include('includes/dbconx.php'); //connects to database
   $user_check=$_SESSION['login_user']; //assigns session variable to local variable
  
   $ses_sql=mysqli_query($con, "select uname from login where uname='$user_check'"); //gets username from database
  
   $row=mysqli_fetch_array($ses_sql, MYSQLI_ASSOC); 
  
   $login_session=$row['uname']; //assigns username fromdbase to local variable
  
   echo $login_session; //echo for testing
   echo $user_check; //echo for testing
  
   if( $login_session === $user_check) //compares session variable to assigned variable from dbase
   {
    header("loacation: adminPage.php"); //if they match redirect to admin logged in page
   }
   else{ 
   header("location: adminLogin.php"); //else redirect back to login
    }  
  
   ?&gt;
  </code></pre>
  
  <p>also here is the logout page</p>
  
  <pre><code> &lt;?php
   session_start(); //starts session
   unset($_SESSION["login_user"]);  //unsets session
   header("Location: index.php"); //redirects to home page/
   ?&gt;
  </code></pre>