Jump to content

best practises for stopping multiple form submissions?


schilly

Recommended Posts

Every now and then we get duplicate orders through our ordering page.

 

I'm just wondering what's the best way for detecting and stopping them.

 

I do a redirect upon payment completion to a confirmation page to stop the person from reloading the browser and submitting the form data gain but they can easily go back and the browser will ask if they want to submit the form data again which they likely will.

 

What's the best practise for this? I could ajax the form but I don't want to do that.

 

Thanks.

You can always set a session variable that is like "recently_submitted"  which has some identifying information, IE the products or the total end cost. If they submit the same thing within x minutes, deny it.

 

But if you do a proper redirect via header, this "should" wipe out the POST data if I recall.

hmmm ya maybe a session var with the total in it and a timestamp. i think that would work.

 

i do a header redirect to the completion page but i'm pretty sure if you go back in the browser it will prompt to resubmit the form.

 

thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.