Re: Problems with RELOAD on browsers
| From: | Alfredo Yong | Date: | Sun, 02 Sep 2001 16:09:26 +0000 |
| Subject: | Re: Problems with RELOAD on browsers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65650@lists.php.net to get a copy of this message | ||
Hi peke:
May be you can try with a hidden "state" field in the form. I think it can be faster and more compatible because you don't need to load the session support.
<input type = "hidden" name="state" value="<?=$MyVar?>">
Pekesan wrote:
Hi... I have a php url on wich in some steps through several forms (on the same url) I do some interaction with DB. I have a session variable with the step I am currently doing. For example session_start(); if (!session_is_registered("MyVar")) { session_register("MyVar"); $MyVar="Second Time"; //Do some stuff //Show a form with the same url in action } elseif ($MyVar="Second Time) { //Do some stuff with the previous form data //Show a form with the same url in action $MyVar="Third Time"; } elseif ($MyVar="Third Time") { //Do some stuff with previous form data session_unregister("MyVar"); //link to the main page } The problem appears when the client-user use reload on the browser. The aplication goes on to the next step without the form data. My question are: Is there any way to go back to the fisrt step when a user makes a reload? Does anybody know another idea to manage this kind of work? Thank in advance pekesan@jazzfree.com