Results 1 to 25 of 64
Thread: Object Persistence in PHP?
Mar 26, 2007, 17:14 #1
- Join Date
- Oct 2003
- 0 Post(s)
- 0 Thread(s)
Object Persistence in PHP?
Just wondering about this (there is probably a not too difficult answer to this, but I can't seem to find the answer online )
How do you keep an object across multiple pages? Say you have a class called Users that pretty much models everything about a user (user name, user id, age, location, user type etc etc.) and you query the database based on the user's login to form the object then store the user_id as a session information. The user clicks on the send a message link, and you'll have to read the user_id for the session and query the database again.
Is there a better way of doing this, or is my concept totally wrong to begin with?
ThanksNew site: www.talkutas.com