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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.