title: php session & iframe
body: <p>I have read a couple of related posts here, but cannot seem to be able to make my script work as intended.</p>
  
  <p>I have a login page where a user logs in. If the password matches, the script writes  two values into the <code>$_SESSION</code> variable: <code>['loggedin']='yes'</code> and <code>['loginname']="username"</code>.</p>
  
  <p>After successful log in, the user goes to another page that has 2 iframes in it.</p>
  
  <p>One iframe uses external content and does not require authentication (removing this iframe from the page does not change anything).</p>
  
  <p>The other iframe uses dynamically generated content from the same domain and does check whether the session variables are still there.</p>
  
  <p>One of the functions refreshes the content of that dynamically generated iframe. </p>
  
  <p>Once this is done, the session variables are lost. In fact, the session itself no longer exists.</p>
  
  <p>I have <code>session_start();</code> on every page that is used in connection with this script.</p>
  
  <p>Any help would be greatly appreciated. </p>