title: $_SESSION, PHP, iframe, not getting the SESSION variables
body: <p>I m creating a very simple PHP-based program for warehousing but quite complicated back-end process.</p>
  <h3>So here is the situation:</h3>
  <ol>
  <li><p>I have the login page that directs to authorization page where it set the <code>session_name</code> for the first time, <code>session_start()</code> and set the session variables.</p>
  </li>
  <li><p>After the authorization page, it goes to the main.php page that is a table with left hand side for menu (links) that I also did <code>session_name()</code> &lt;-- same name as the one created from (1), and start the session.</p>
  </li>
  <li><p>On the right hand side of the main page is the iframe that display the page when user click the links on the left. I also did <code>session_name()</code> &lt;-- same name as the one created from (1), and start the session.</p>
  </li>
  </ol>
  <h3>Problem:</h3>
  <p>main.php is ok, it reads the session variable perfectly, but the iframe couldn't get the session variables (i tried to <code>print_r($_SESSION)</code>, and came up empty). I tried <code>var_dump(session_name(&quot;abc&quot;))</code>, where &quot;abc&quot; is the session name that i used in (1), and it does show &quot;abc&quot;, tried (<code>isset($_SESSION)</code>) and returns true... so I don't know what am I doing wrong...</p>
  <hr />
  <p>EDIT:
  I m sorry guys, i think i may have found the culprit... it is a logic error on my side... i have this condition to check every php page i created to destroy session when the user level is not authorized to use this current page. My bad.. thanks so much for your help guys!!</p>