Using "Post-Redirect-Get" is the best method - as it avoids data being
resubmitted if the user refreshes the page or uses their back/forward
buttons.  So, your addToCart action should be called (either through
post or get), do its stuff, then redirect.  To get back to the previous
page I personally keep a list of the request history in the session,
and use that.  Otherwise I would say redirecting to the shopping cart
itself like Scott suggested is the best method.

To keep a list of the request history, just store the
$this->params['url']['url'] in your app_controller beforeFilter.  On a
redirect remove the last request (as you won't want to send the user
back to something that redirected).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to