Help with Back button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmcnally
    New Member
    • Jan 2008
    • 1

    Help with Back button

    Hi all,

    I have a site it goes like this

    Front Page Add to cart button ->
    Page with an onload auto-submit form through JS ->
    View Cart

    When they click the back button from view cart, it brings them back to the auto-submit form which in turn brings them back to the View Cart page with another item added because the form is submitted again.

    I have to do it this way to convert an <a href with a ?str to a post form.

    I am using PHP 5 =)

    Any ideas you all have would be excellent =)

    Light and Love and Healing Peace Propserity JOy and Abundance to you all,
    -Patrick Arden McNally
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Hi Patrick, welcome to TSDN!

    Try using a post-redirect model, i.e. once the form is posted, it is redirected, so when the user presses back they avoid a double post. It will also avoid the popup that asks for confirmation about posting again.

    Comment

    Working...