Jump to content

Maintaining form data


txmedic03

Recommended Posts

Okay so here's the situation.  I have a form with multiple input elements and select elements and some of the select elements derive their values from a MySQL database, so naturally I want my target users to be able to add new entries to the database and then come back to what they were working on. The question is how do I get them to the form to enter new values into the database and then back to the main form without losing everything they already typed.  I tried to do a top.location redirect propagating all the values in the $_GET array, but for some reason it would not work.  I did it fine in a test file, but when I tried to redirect inside my main script it did absolutely nothing.  I then tried using cookies, but could not get it to set cookies in javascript and then let me read them from PHP.  I thought perhaps using the cookies with onChange for each element would be more efficient since this is for a company and I am installing their server and I have access to their entire network so I can make sure that they are accepting cookies from the local server.  I am open to suggestions here. Oh and there are 27 variables to be tracked while the user moves from page to page.

Link to comment
https://forums.phpfreaks.com/topic/42722-maintaining-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.