I'm trying to correct the issue of double submit in my script. I have done a bit of googling, but most solutions that i have found arn't quite what im looking for...
In my script, i have something like the following (on a single page):
execute some code when the form is submitted
<form method="POST" action="">
<input type="hidden" value="hidden_field" name="hidden_field"/>
So basically the form and code when the form is submitted are in the same file. A quick example of what is happening is when you add or delete a certain item via the form, if you click back on the browser or refresh the page it tries to submit again. This is the double submit problem.
In my searches i mostly found scripts to disable buttons, but this didnt work. What i want to happen is when you submit the form, and the page reloads, it no longer tried to submit again when the page is refreshed or the back button is clicked. I heard the best way to do this is by redirect and changing POST to GET.
Does anyone know how i can go about getting this working?
Thanks in advance,