Jump to content

Reload is Clearing Form Data


pachelbel101

Recommended Posts

I've written a number of PHP applications, and in all my applications if you reload the page (or go "back" to a page), then any form fields on that page are reset to their original value.  Basically I think that instead of returning to the state that page was in - as often happens on other sites - the PHP script executes again as if you typed in the URL and click "Go" instead of reloading.

In an attempt to find the culprit I created a bare-bones form page - that worked perfectly on reload.  Slowly I added in pieces of a page that doesn't work correctly, and still the test page worked fine.  Finally, I copied everything in the "bad" page into the "good" test page, and STILL the test page worked correctly and the old page didn't.

So, what do you have to do to get form data to remain when a user reloads the page, or goes "back" to a page?  Or what do you NOT have to do?

Thanks for your help.  This has been driving me crazy for a while.
Link to comment
https://forums.phpfreaks.com/topic/26868-reload-is-clearing-form-data/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.