I am a beginner to OOP, but I have been using php/mysql for a while.
I understand how the oop concepts work, but not sure how it would integrate with sessions.
for example, if a user login to my website on page 1, i can pass his variables to page 2 using sessions. But how would it work if i had used an object instead of a bunch of variables?
Can I pass an object via session? Or do I have to initialize the object, update the database, pass a key variable, then on page 2, use the key variable to retrieve the object from the db? Maybe I am a little confused but that doesnt seem at all efficient.
Can anyone explain?
Thanks.