Page 1 of 1

PHP temporary storage

Posted: Thu Oct 06, 2005 2:29 pm
by jeremiorama
Hi there!

I'm having a little problem here dealing with a MySQL database, but this question is not about MySQL, so I posted it here.

What I'm trying to do is keep a database request in a temporary storage place (if it can be done) so that I can use the data put there while the user surfs the web site.

O.K. To be a bit more understandable, let's put it that way:
The user has several choices, and when the user clicks on one, a request is made to the database and the data is put in an array (sometimes big arrays). I would like this array to be kept, so the user can continue browsing and does not need to reload it, let's say, while he turns the pages of the contents.

If you have any questions, let me know.

Thanks for your help!

-jeremiorama

Posted: Thu Oct 06, 2005 2:39 pm
by Skara

Posted: Thu Oct 06, 2005 2:43 pm
by jeremiorama
Hey Skara,

But I have a lot of information in there. It would be a bit too big for cookies, wouldn't it? Like a year's log of a company's phone calls. Is there another way?

Thanks,

-jeremiorama

Posted: Thu Oct 06, 2005 2:56 pm
by Skara
Ok, how's this sound. Create a unique id and save it as a session/cookie. Then store that id along with the data in a db table.

Posted: Thu Oct 06, 2005 3:00 pm
by jeremiorama
Hey,

It sounds great! I've just started PHP this fall and I love it (that sounds stupid, like every newby who starts, but anyways, I just wanted to let you know). Thanks.

-jeremiorama