title: Login session destroy after page reload/refresh
body: <p>I've problem to understand how different browsers handle my script differently. First please take a look at this simple code that I use for validating users.</p>
  
  <pre><code>&lt;?php
  session_start ();
  if (!isset($_SESSION["login"] , $_SESSION['email'])) 
  {
  header("location: index.php");
  };
  include ("DBconn.php");
  ?&gt;
  </code></pre>
  
  <p>After session successfully created and I enter the page, what happen is when I reload the page the login session that has been created before somehow destroy/missing and I redirect to login page. I try to check the session ID and it did not change. This issue happens in FF and Chrome latest version, it not happen in Opera 18 or Chrome older version. Please can someone give some help to solve this issue. Many thanks.</p>
  
  <p>Here is my complete login.php.</p>
  
  <pre><code>&lt;?php
  session_start ();
  include ("DBconn.php");
  
  
  $email = mysql_real_escape_string ($_REQUEST['email']); 
  $pass = mysql_real_escape_string ($_REQUEST['pass']); 
  $passi_db = md5 ($_REQUEST['pass']); 
  
  
  $query = "SELECT * FROM members WHERE email = '$email'";
  $mail = mysql_query ($query);
  
  
  
  
  if (mysql_num_rows ($mail) == 1)
  {
  
  $query = "SELECT * FROM members WHERE email = '$email' AND pass_db = '$pass_db' AND active = 1";
  $password = mysql_query ($query);
  
  
  if (mysql_num_rows ($password ) == 1)
  {
  
  
      $d = mysql_fetch_array($password );
      $operator = $d['operator_1'];
  
      $_SESSION['login'] = 1;
      $_SESSION['email'] = $email;
  
      $data["status"] = "yes";
      $data["operator"] = $operator;
      echo json_encode($data);    
  
  
  
      }
  else 
  {
  
      $data["status"] = "NOTmatch";
      echo json_encode($data);    
      }
  }
   else 
  {
  
  
  $data["status"] = "emailNOTexist";
  echo json_encode($data);    
  
  }
  
  
  mysql_close ();
  
  ?&gt;
  </code></pre>