title: I cant get/access the value of my session variables to another page
body: <p>Im having a problem of accessing the session variable value.</p>
  
  <p>im creating a login page and this were i set the values of my session variables.</p>
  
  <p><strong>index.php</strong></p>
  
  <pre><code>    $row = mysqli_fetch_array($result);
      if(mysqli_num_rows($result) &gt; 0){
          session_regenerate_id();
          $user = mysqli_fetch_assoc($result);
          $_SESSION['SESS_ID'] = $user['id'];
          $_SESSION['SESS_UNAME'] = $user['username'];
          $_SESSION['SESS_PASS'] = $user['password'];
          session_write_close();
          header("location:home.php");
          exit();
      }
  </code></pre>
  
  <p><strong>home.php</strong></p>
  
  <pre><code>&lt;?php
  session_start();
  if(!isset($_SESSION['SESS_ID']) || (trim($_SESSION['SESS_ID'])) == ''){
      header("location:index.php");
      exit();
  }
  ?&gt;
  &lt;html&gt;
  &lt;body&gt;
      &lt;p&gt;Login Successful&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the problem here is i have no value in $_SESSION['SESS_ID']..so how do i get or access the value of this session variable in my home.php?</p>