how to set the values of the forms and make it stick even after refresh?
<p>I have a long form, wherein, when I click the submit button the external js validation fires up and checks the validity of the input fields. If all the input fields passed the validation a jquery modal pops out asking the user to register or login.</p>

<p>Now, if the user choses to register and finishes registering from the modal, the modal closes and the page refreshes automatically and shows the user is automatically logged-in.</p>

<p>My problem now is that the input data from the long form he filled in before the registration got erased when the page refreshed.</p>

<p><strong>How can I make input fields not erase on refresh of a page? Is it possible to set the session within the external js file ? If yes, how can I to that?</strong></p>

<p>For example:</p>

<pre><code>$_SESSION['resumetitle'] = $_POST['resumetitle'];
$_SESSION['resumeintro'] = $_POST['resumeintro'];
$_SESSION['name'] = $_POST['name'];
$_SESSION['dob'] = $_POST['dob'];
$_SESSION['contacttel1'] = $_POST['contacttel1'];
$_SESSION['contacttel1type'] = $_POST['contacttel1type'];
$_SESSION['contacttel2'] = $_POST['contacttel2'];
$_SESSION['contacttel2type'] = $_POST['contacttel2type'];
$_SESSION['contacttel3'] = $_POST['contacttel3'];
$_SESSION['contacttel3type'] = $_POST['contacttel3type'];
$_SESSION['primaryemail'] = $_POST['primaryemail'];
$_SESSION['secondaryemail'] = $_POST['secondaryemail'];
$_SESSION['skype'] = $_POST['skype'];
$_SESSION['facebook'] = $_POST['facebook'];
$_SESSION['linkedin'] = $_POST['linkedin'];
$_SESSOIN['twitter'] = $_POST['twitter'];
$_SESSION['messenger'] = $_POST['messenger'];
$_SESSION['yahoo'] = $_POST['yahoo'];
$_SESSION['aol'] = $_POST['aol'];
$_SESSION['summaryofpositionsought'] = $_POST['summaryofpositionsought'];
$_SESSION['summaryofskills'] = $_POST['summaryofskills'];
$_SESSION['gender'] = $_POST['gender'];
</code></pre>
