View Full Version : Reposting Form Data (Hitting Back on Browser)
10-06-2004, 07:19 PM
Anyone have a way to repost form data after hitting the browser back button without the user having to hit retry?
10-06-2004, 08:24 PM
I would think that would depend on the User Agent. You want the form to be reposted after hitting back? Usually that causes a box to popup saying POST session expired, do you want to resend? Or something of the sort.
10-06-2004, 09:00 PM
10-06-2004, 09:12 PM
So the problem is with php validation then? Well then:
Include the form with include();
put value="<?php echo $_POST['fieldname']; ?>"
If you include the form again when validation fails, and have value="<?php echo $_POST['fieldname']; ?>" in their respective places, all the data will still be there.
This also gives you the oppurtunity to post in red what did not validate, on top of the form, or put a pretty red asterisk next to the culprit.
Edit: Best part: They won't have to hit the back button any longer!
10-07-2004, 12:39 AM
Hmmm. Good idea. Thanks!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.