Re: Store form values in session
From: Sjaakie Helderhorst (non.existant_at_email.com)
Date: 09/29/04
- Next message: Andrew _at_ Rockface: "Re: self processing forms"
- Previous message: Spam sucks: "Re: Please help this google experiment"
- In reply to: cool: "Re: Store form values in session"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Sep 2004 11:16:59 +0200
"cool" <coo@goontrytospamme.dk> schreef in bericht
news:pan.2004.09.28.05.56.20.484805@goontrytospamme.dk...
>
>>> Maybe I'm using a wrong approach, can you put me in the right direction?
>>>
>>> Thanks in advance!
>>>
>>>
>
> Hi,
>
> I think you may be using a wrong approach. When a user clicks on the
> browser "back" button, I think a cached request of the previous page,
> including all values entered in the previous page's fields, are sent to
> the server. In this case, the $_POST of the previous page should contain
> the previous page's form field values, which may be what you want.
> However, I don't think this behavior is guaranteed, and maybe something
> that can be adjusted in the browser.
>
> You can check this by simply printing out the contents of the $_POST (or
> $_GET depending on your situation) arrays, put a print_r or whatever
> statement at the top of each of your scripts, and see what you get when
> you hit the back button. With several of these array dumps for $_SESSION
> and $_POST around your code, you can at least see what is or is not
> happening.
>
> I generally find that it is a bad idea to allow the user to use the back,
> forward or refresh button of the browser, in particular if the web pages
> are used to alter a database. So I place my own back, etc. buttons on my
> pages, and I penalize the user for attempting to use back, forward or
> refresh of the browser with a little bit of code that senses this, and
> sends the user back to the site's introduction page.
>
> Regards,
> Steve, Denmark
Printing $_SESSION content show me post data is not available in session
(maybe even removed) whenever I move back (custom button) to previous page.
Maybe storing these vars in a database could solve this issue, but there are
lots and lots of vars (depends on choices made by visitor)...
- Next message: Andrew _at_ Rockface: "Re: self processing forms"
- Previous message: Spam sucks: "Re: Please help this google experiment"
- In reply to: cool: "Re: Store form values in session"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|