RE: [PHP] VERY IMPORTANT: Sessions in Pages with a Form !
| From: | Sascha Schumann | Date: | Wed, 27 Sep 2000 23:07:08 +0000 |
| Subject: | RE: [PHP] VERY IMPORTANT: Sessions in Pages with a Form ! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17816@lists.php.net to get a copy of this message | ||
On Thu, 28 Sep 2000, Jason Murray wrote:
> > I have a big trouble:
> >
> > 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.
>
> This is common practice in some browsers I believe when under HTTPS. It
> means if you're in a netcafe, noone can hit the back button and find your
> CC number.
>
> > I know for sure that it is something that has to do with
>
> Try structuring your form differently so that it submits to itself. That
> way you can validate the input, display the error message and redisplay
> the form with the user-submitted values filled in so that they can
> correct them on the same screen as the error message. This is a lot
> more user-friendly.
That is the recommened way.
In session land, every client-side caching (be it a browser
or a proxy) is a source of inconsistency between data on the
server and the displayed information, so we try very hard to
force clients not to cache any information.
- Sascha