Forum Moderators: coopster
An example would be hitting preview in a forum and going back to edit it.
First is that once you click submit you've sent the form. The browsers are giving you those error messages because they were designed to look for duplicate submissions of the same form for security reasons.
Second is that you're using the browser's back button rather than providing the user a method to go back and make edits. Control the user's browsing by giving them a way to go back and make changes.
Option one is to enable sessions [us2.php.net], allow the user to edit and view thier form but do not send the form until the user has had a chance to review/edit it to their satisfaction. Sessions will allow you to carry the values of the form fields as the user bounces back and forth between the form and the review pages.
Alternately, if you don't want to get into sessions you could also just use hidden vars on the review page and pass them back and forth.
Good question. I am not 100% sure about this but here is what I think is happening. The back button is client side. It's just showing you the last page you viewed. If it was a form then it will most likely show you the form as you had submitted it. Your form on your website must have some code that requires interaction with the server (perhaps and onLoad event?) so when you use the back button you are making another request to the server.
Damn, if I didnt redo my computer losing all those favorites.
EDIT: What about this?
session_cache_limiter('private, must-revalidate');
Heres what you do, I have a form that you user inputs ban information, after the form gets submitted, the code that checks the form gets all the input from the form, and instead makes a dynamic variable from it, and you get sent to it after its made.
Example, i'm on a ban page where its asking me for ban information. I enter it all in, hit submit, and get a header to this sample page which is what actually carries it out and gives me some nice text like "your ban was completed"
htt://site.com/?fn=ban&user_id=3&days=4&ppd=9&forum_wide=&forum_id=2
its ingenious. But what about long posts sadly, would they just enter the info in on the submit and the confirmation page is what you get the header to? You can hit back successfully in all of these conditions as well.