waseem Posted November 12, 2010 Share Posted November 12, 2010 Hi Friends ! I need to discuss a problem with you. When we fill a customer info form, and redirect to other page. but go back by browser's back button and resubmit the form. In this case duplicate data is inserted. Or when we refresh a page multiple data is inserted, so HOW TO AVOID this terrible problem ? Quote Link to comment https://forums.phpfreaks.com/topic/218473-duplicate-insertion-problem/ Share on other sites More sharing options...
litebearer Posted November 12, 2010 Share Posted November 12, 2010 check into INSERT IGNORE http://www.tutorialspoint.com/mysql/mysql-handling-duplicates.htm Quote Link to comment https://forums.phpfreaks.com/topic/218473-duplicate-insertion-problem/#findComment-1133389 Share on other sites More sharing options...
revraz Posted November 12, 2010 Share Posted November 12, 2010 One way that will work except where your visitors have meta redirects disabled would be to set up two web pages where the first consists of nothing except an immediate redirect to the second (plus a link for those with meta redirects disabled). Pressing the back button on the second page will go back to the first page which will immediately redirect back to the second page. Quote Link to comment https://forums.phpfreaks.com/topic/218473-duplicate-insertion-problem/#findComment-1133394 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.