Jump to content

Archived

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

nisroc

Data transfer

Recommended Posts

Is it possible to transfer data from one page to another without the need of a database using php? If so can someone point me to an example.

Share this post


Link to post
Share on other sites
form data is what i need. i was thinking a session, but i think that is a bit advanced for me however im gonna try it anyway.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×

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.