title: PHP Session variables not being passed to the next page
body: <p>I know this title is duplicate to 1000's of other posts related to an issue and I apologize in advance if the solution is out there. Trust me I went through tons of posts regarding this topic and tried all the solutions prescribed, but have had no luck.</p>
  
  <p>I am trying to create SESSION variables through the following code in page 1:</p>
  
  <pre><code>&lt;?php
    $conditionArray = array('Past', 'Past', 'Future', 'Future');
    $typeArray = array('Gains', 'Gains', 'Losses', 'Losses');
    shuffle($conditionArray);
    shuffle($typeArray);
    session_start();
    $_SESSION['conditionArray'] = implode(',',$conditionArray);
    $_SESSION['typeArray'] = implode(',',$typeArray);
    var_dump($_SESSION);
  ?&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now var_dump shows the following:</p>
  
  <pre><code>array(2) { ["conditionArray"]=&gt; string(23) "Future,Past,Past,Future" ["typeArray"]=&gt; string(25) "Gains,Gains,Losses,Losses" }
  </code></pre>
  
  <p>which is fine. </p>
  
  <p>On the next page I am trying to retrieve a variable by the following code:</p>
  
  <pre><code>&lt;?php
    session_start();
    echo $_SESSION['typeArray'];
    var_dump($_SESSION);
  ?&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and it gives me:</p>
  
  <pre><code>array(0) { }
  </code></pre>
  
  <p>I tried looking into the error log files of php and I don't see anything relevant. Any help would be greatly appreciated!</p>