Re: VERY IMPORTANT: Sessions in Pages with a Form !

From: Date: Wed, 27 Sep 2000 23:14:14 +0000
Subject: Re: VERY IMPORTANT: Sessions in Pages with a Form !
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17822@lists.php.net to get a copy of this message
Hi, > When I use sessions on a page that also has a form in it the back button > doesn't work. Like when a subscriber gets an error from my script saying > that he didn't fill the form out completely and he tries to hit back button > of his browser the whole form disappears. Every single field becomes empty. Does the browser reload the form when you hit the back button? > I know for sure that it is something that has to do with sessions, since > commenting them, back button will show you "your" form and not an empty one. I guessing that in this scenario you hit the back button and the browser *did* not reload the form from the server. I'm guessing, but it's probably a case of the browser reloading the form on 'back' when the sessions are used vs it just using a cached version when no sessions (and cookies) are in use. > It is very important for me to resolve this problem, since we saw a BIG drop > in subscriptions since I started using sessions in the pages using forms. > I know few ways to fix it, like: registering the sessions with the field > values, outputting the data again when there's an error, recording the data > submitted and prompting only for the missing one.. but, it's hard to explain > why, I REALLY NEED the back button to work with sessions just like it would > be without them, Don't use the back button. It fails in may situations. Just put your form and form responder code in the same page. If the use misses part of the form, don't use back, just output the form again and put the submitted form values into the new form HTML. -- Simon Edwards Animated Design, Melbourne http://www.animated.net.au/ Ph: (03) 98850990

« previous php.general (#17822) next »