Page 1 of 1

Problem with $_SESSION

Posted: Tue Sep 26, 2006 4:14 pm
by dogsface
I have a form named: form1, with 2 fields, Name and Last Name, form1 starts with a session ID: session_start();

When I click SUBMIT in the form1, it's going to form2.

I have a check for error in form2, if the user forgot to enter Name or Last Name, it will trow and error warning, and I hava a button were the user can click to go back to form1 to corrct any mistake, that button is like this:
$error = "
You forgot to fill out the form! Try again. Thank you.
<input type=\"submit\" value=\"Go back\" onClick=history.go(-1);>
";

The problem I am having, is that when I click the button, IE trows an error page and I cant see the form1 and I need to refresh the page in order to see form1, there is no way I cant go directly from the button. I tryied in firefox and when I click in the button, firefox gives me a javascript pop menu with the following:

"The page you are trying to view contains POSTDATA that has expired from cache. If you resend the data, any action the form carried out (such as a search or online purchase will be repeated. To resent the data click OK, otherwise click cancel."

and it allow me to go to the form1.

Please can anyone help out here?? What am I missing or doing wrong??

Thank you.

Posted: Tue Sep 26, 2006 4:51 pm
by volka
try

Code: Select all

session_cache_limiter('private_no_expire');
session_start();
see http://de3.php.net/function.session-cache-limiter

thanks, that worked!!!!

Posted: Wed Sep 27, 2006 1:39 pm
by dogsface
hey thank you very much, I was reading about this on php.nt, and that help me to fix the problem.!!!

1 million thanks!

doggy

Posted: Wed Sep 27, 2006 1:43 pm
by volka
dogsface wrote:I was reading about this on php.nt, and that help me to fix the problem.!!!
What more could i ask for? Image