Re: Refresh (F5) adds another SQL record.
| From: | Mukasa Assey Alfred | Date: | Wed, 18 May 2005 05:43:42 +0000 |
| Subject: | Re: Refresh (F5) adds another SQL record. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-215453@lists.php.net to get a copy of this message | ||
Force a reload of the document after step (4), you may use javascript to reload this document, ie...
After step (4).... add this line...
print "<script>document.location.href='<your-document-url>';</script>";
Assey.
On Tue, 17 May 2005, Robert Meyer wrote:
Hello, Scenario: 1) User is presented a blank form. 2) User fills in form. 3) User submits form. 4) Record is added to database. 5) Back to 1). All is fine to here. 6) User clicks refresh. 7) Another record is added, same data except auto-increment field. How do I prevent these last two steps, or at least prevent a record from being added when refresh is clicked? Regards, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php