PHP temporary storage

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jeremiorama
Forum Newbie
Posts: 3
Joined: Tue Sep 27, 2005 12:57 pm
Location: Montreal, Qc

PHP temporary storage

Post 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
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

jeremiorama
Forum Newbie
Posts: 3
Joined: Tue Sep 27, 2005 12:57 pm
Location: Montreal, Qc

Post 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
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post 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.
jeremiorama
Forum Newbie
Posts: 3
Joined: Tue Sep 27, 2005 12:57 pm
Location: Montreal, Qc

Post 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
Post Reply