I'm creating a multipage "interview" type form where the vars are passed between pages in $_SESSION['.......']. If I post any page, the pars pass and are available on the subsequent pages. If I click the "<< Back" link created by the below jscript one time, the previously posted vars are populated in the boxes (I have this at the top of every page)
session_cache_limiter('private, must-revalidate');
session_start();
If I go back two pages and then go forward one, the vars are gone. If I use the browser back and forward buttons the vars are preserved. The << Back and Next >> are done by the two scripts below.
Is there a reason the vars are wiped from $_SESSION when using the <<Back link?
<a href="javascript: previousPage()"><< Back</a>
<SCRIPT language="JavaScript">
function previousPage()
{
history.back();
}
</SCRIPT>
<a href="javascript: nextPage()">Next >></a>
<SCRIPT language="JavaScript">
function nextPage()
{
document.myform.submit();
}
</SCRIPT>