Jump to content

Data transfer


nisroc

Recommended Posts

If it is a small amount of data, pass it in the url to the next page, then use $_GET to retrieve it.  If it's a large amount of data, why are you passing it from page to page?  Why not include the second page in the first (or just make one page)?

What are you trying to accomplish by passing the data from page to page?
Link to comment
Share on other sites

dear friend,
many people use the word database for mysql, oracle etc. if you take the meanings of database as the same you can store the form data in a file say data.txt and then retrieve the data into another file using some simple functions. you can ask for more from here if you wish to use files. no matter how huge the amount of data is you can do it this way.
Link to comment
Share on other sites

If you want to pass form data across multiple pages -- say you have a multipage form -- then there are really only two ways I would do it.  One with sessions, which I suppose we've ruled out.  The second is to store the data from page one in hidden fields on page two.  I think it is pretty clear how this would work.  When the user requests the second page of the form your script would check for post data from the first page and then screen it; it would report any errors and if none were found it would set the form data to hidden fields.  Then when the user submits the second form you could just scan all of the information once more.

You may not need to raise errors if the user leaves fields blank or something on the first page, but you'll want to check for some things most likely, and  you'll want to escape the data.
Link to comment
Share on other sites

What i am actully doing here is reating a test. The test results and answers are stored in a database along with the user, ip, date, and score. Now once the test is submitted it will called their score from the database and display it on page two. The problem is I need to store a user name so that i can update records and not hagve them mixed up with someone elses. This is big  group only 25 users will be using this forum.
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.