CanMan2004 Posted September 2, 2006 Share Posted September 2, 2006 HiI have a php form which sends data to a sql database, I perform the sql query with a $_GET actionThe form does a GET and posts the data in the URL likeregister.php?action=add&name=dave&department=2the php code I then use is[code]if ($_GET['action'] == 'add'){INSERT INTO .........}[/code]Once the INSERT is done, the user is directed to another page, the problem is that because the form method is set to GET, when the user clicks the back button, the GET action and data that was sent from the form is in the URL and the form data is submitted again.Is there a way to distroy the GET data from the form or know if a user has clicked the back button.Any help would be greatThanks in advanceDave Quote Link to comment 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.