doubledee Posted December 21, 2011 Share Posted December 21, 2011 If I have a standard HTML form in my PHP script and the User submits the form - which resubmits to itself for processing - and then the User hits the "Back" button and then the "Forward" button, why does the Form and its data get re-submitted?! What mechanics are exactly happening? I had a "Submit Payment" page that was doing that and so people would get charged twice and that is obviously a big problem. Please help me understand what causes that issue and different ways to fix it. Thanks, Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253589-what-happens-with-form-double-submission/ Share on other sites More sharing options...
SergeiSS Posted December 21, 2011 Share Posted December 21, 2011 Read here, was discussed some days ago: http://www.phpfreaks.com/forums/index.php?topic=350036.0 I hope you'll find a solution in that topic. Quote Link to comment https://forums.phpfreaks.com/topic/253589-what-happens-with-form-double-submission/#findComment-1300002 Share on other sites More sharing options...
shankarganesh Posted December 21, 2011 Share Posted December 21, 2011 HI, Please let me know all the database operations are done is same single page? ie, design and database operations are done in same php page? I recommend you to separate these tow in different pages one for design and another for database operations. When user submits the page, the data should be posted to DB operation page and after completing the DB process redirect your page to another page that contains success message. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/253589-what-happens-with-form-double-submission/#findComment-1300029 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.