title: keep php session alive and acessible from jquery
body: <p>having big trouble managing my sessions so I'm asking help.</p>
  
  <p>the scenario</p>
  
  <p>from 1 iphone I load index.php login form here</p>
  
  <p>jquery</p>
  
  <pre><code>$("#login").live('click', function(event) {
     //here I've the user input username and password an load the login.php
  }
  </code></pre>
  
  <p>in login.php I also have the session_start() and If user is indeed who he claims to be I declare <code>session['user'] = $user; and session['pass'] = $pass;</code> and then redirect him to imap.php</p>
  
  <p>imap.php has also <code>session_start()</code></p>
  
  <p>he does everything and returns a html string with some divs I will use as buttons</p>
  
  <p>jquery</p>
  
  <pre><code>$("#erase").live('click', function(event) {
      //here i load the erase.php
  </code></pre>
  
  <p>erase.php</p>
  
  <p>also have <code>session_start()</code>, but now the <code>session['user']</code> and <code>session['pass']</code> are gone... </p>
  
  <p>all the loads are made with post method</p>
  
  <p>What can I do to maintain the sessions variables?</p>
  
  <p>Thanks</p>