php post data in if else statement
<p>I have a sign up form came with 3 pages.
I use jquery $post to post error message back without refresh
2nd php page will check all data. if all data correct than it will send to 3rd page(agreement page). If user click agree in 3rd page, than all data will write into database.</p>

<p>However I have problem to post data to 3rd page in php by using if &amp; else</p>

<p>This is a sign up form. Therefor I can't use $_GET[]</p>

<pre><code>ex. else{header("location:agreement.php?email=somedata&amp;pw=somedata");}
</code></pre>

<p>is any way I can pass those data to 3rd page in php?</p>

<p>1st page</p>

<pre><code>    &lt;form&gt;
    &lt;input type="text" name="email"/&gt;
    (some input)...

    &lt;input type="button" onclick="get();"/&gt;
    &lt;/form&gt;



JQUERY
function get(){
    $('#error').hide();
    $.post('signup.php',{firstname:signup.firstname.value,...},
    function(output){$('#error').html(output).fadeIn(50);})
    }
</code></pre>

<p>2nd page          </p>

<pre><code>signup.php
    if(will check everything){echo "error";}
      //Jquery will output error without refresh the page
    else{
        [Need to POST all sign up data from 1st page to 3rd page]
        header("to agreement.php");
    }
</code></pre>

<p>3rd page    </p>

<pre><code>agreement.php
if user tick agree. All sign up data will insert into database.
</code></pre>
