Hello
i am an intermediate user of php, yet some things still bug my codes since i first started:
when processing mysql query, i tend to separate the HTML form with the processing php page. then after executing the query(either adding new record or update it), i would redirect to another separate HTML page just for 'sucess message'.
the problem is, when the user "backs" (that is to click on the back button of a browser so as to retain previous page), the query executes again, resulting from "duplicate error" on mysql.
can anyone help me with this.
thanks in advance.
Problem with "Backing"
Moderator: General Moderators
- harrisonad
- Forum Contributor
- Posts: 288
- Joined: Fri Oct 15, 2004 4:58 am
- Location: Philippines
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- harrisonad
- Forum Contributor
- Posts: 288
- Joined: Fri Oct 15, 2004 4:58 am
- Location: Philippines
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Just eliminating one potential problem with the header question 
Think I know how to solve this: put the processing code into a separate file from the display code, then the submit button takes you to the processing page which redirects you to the success page. Pressing the back button from the success page takes you to the display page.
Mac
Think I know how to solve this: put the processing code into a separate file from the display code, then the submit button takes you to the processing page which redirects you to the success page. Pressing the back button from the success page takes you to the display page.
Mac