Re: Separation between View and State (The Back Button)

From: Date: Thu, 13 Jul 2006 19:05:21 +0000
Subject: Re: Separation between View and State (The Back Button)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-239434@lists.php.net to get a copy of this message
On Thu, 13 Jul 2006 14:41:21 -0400 Jim Moseby <JMoseby@nrbindustries.com> wrote: > > > > Let's say you have a "Buy" button that posts a form to a script that > > inserts or increments the quantity of a record in a shopping cart > > table. So you click "Buy" and then "Checkout". Now if you hit the Back > > button it asks the user if they would like to repost the form. If you > > click "Ok" the db script runs again and now they have two items in the > > cart. Not good. > > > ::snip:: > > Someone posted here an elegant way of handling that, but I can't remember > who or the specifics of how. But, IIRC, it involved a header you can send > that keeps the page from being included in the browser history. So when the > user hits 'Back', it skips the processing page and takes them back to the > form page. Actually what would be even better is if there were a header that indicated the form data should NOT be reposted on back or reload. Anyone heard of such a thing? Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/

« previous php.general (#239434) next »