forcing refresh after storing data to the database
Posted: Mon Nov 13, 2006 9:40 am
I have a generic HTML + PHP question that has been driving me crazy for the last few hours. I have a form on one on my plugins that uses an HTML form and upon hitting the submit button does some processing and updates a timestamp in one of my tables. Once the submit finishes it returns to the form but displays old information. For example, say i have a user form that says 10 entries and each of those entries has an associate timestamp associated with it. When i enter the page obviously all the information is correct. Then i select some options and hit a submit button, some processing takes place, inserts a new timestamp into the database for a processed entry from the previous form and then finishes. Now the html form still shows the same timestamp that it did originally so the data is old and stale and I am not sure how to force the page to reload. I tried some javascript stuff and sending HTML headers but haven't figured out a solution yet. I tried looking at the serendipity_admin and the edit entries stuff this after saving an entry all previous data is retained. I am guessing that this stuff is stored in the serendipity array for later retrieval? I also tried using various types of PHP vars to try to retain this persistent data but i have been beating my head against the table because I stink at HTML.
So is there anything I can do so that I don't have to manually refresh the page every time data is changes are made to my table? Obviously the answer is yes but a pathetic coder could use some help
. Any help would be greatly appreciated.
So is there anything I can do so that I don't have to manually refresh the page every time data is changes are made to my table? Obviously the answer is yes but a pathetic coder could use some help