title: Passing PHP session to different folder
body: <p>how do you pass a PHP session value to different folders?</p>
  
  <p>I have this index page in the localhost.</p>
  
  <p><strong>localhost/index.php</strong></p>
  
  <pre><code>&lt;?php
    session_start();
    $_SESSION['Username'] = 'Hello';
    header('Location: ../AnotherFolder/index.php');
  ?&gt;
  </code></pre>
  
  <p>In here, I want to echo the <strong>$_SESSION['Username']</strong> on other sub-folder</p>
  
  <p><strong>AnotherFolder/index.php</strong></p>
  
  <pre><code>&lt;?php
    session_start();
    echo $_SESSION['Username'];
  ?&gt;
  </code></pre>