title: PHP session variables not saving between pages
body: <p>I know this might be a duplicate question, but I can't seem to find an answer to my specific problem.</p>
  
  <p>I have 3 PHP files. signin.php gets users data and passes it to signin_auth.php.</p>
  
  <p>signin.php then redirects to mytoolkit.php after successful sign in.</p>
  
  <p>signin_auth.php uses the following code at the very end of the PHP script:</p>
  
  <pre><code>&lt;?
  session_start();
  
  $_SESSION['sessionID'] = $id;
  $_SESSION['time'] = time();
  
  header ("Location: mytoolkit.php");
  exit;
  
  ?&gt;
  </code></pre>
  
  <p>Then, the users is redirected to mytoolkit.php, which uses this code:</p>
  
  <pre><code>&lt;?
  
  session_start();
  
  if (!isset($_SESSION['sessionID'])) {
  
      header('Location: signin.php?message=4');
          exit;
  
  }
  
  $inactive = 5400;
  $session_life = time() - $_SESSION['time'];
  
  if ($session_life &gt; $inactive) { 
  
     session_destroy(); 
     header("Location: signin.php?message=5"); 
     exit;
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>The session variables aren't storing and mytoolkit.php keeps redirecting me to signin.php?message=4</p>
  
  <p>Probably a stupid mistake. I've just been looking at it too long.</p>
  
  <p>UPDATE --</p>
  
  <p>So I have a couple of servers. Both on iPage. I moved the entire folder over to a differnent server (abc.com/toolkit is now copied to xyz.com/toolkit) The app runs perfectly on xyz.com... it the first server that's giving me probelms.</p>
  
  <p>There both run on the same hosting company. I'm not sure what to do.</p>