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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 Jul 2006 14:41:21 -0400
Jim Moseby <JMoseby@xxxxxxxxxxxxxxxxx> 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux