hey guys..
im learning php atm, and decided to become a member of this site since i will probably be doing a decent amount of php in the future inshAllah, and when ur active in something, its always helpful to be an active member in a forum related to that "something"...
anyways, im doing a practice project in php (making a forum), and trying do decide on a mechanism to keep a user logged in. ive created a user class, through which a user is authenticated (on sign in) and all future user account related operations will be through that class (i.e user related info retrival, when a user makes a post/comment, etc)
to keep a user logged in, the easiest path seemed to be to use session and store the user object in a session (not cookies since that would be a security risk), but after doing some reaserch i found out that sessions can but a huge load on a system, specially if large amounts of data is saved in them.
im thinking a second alternative would be to save only the user id, but that would mean on each page i will have to rebuild the user object, which i guess would again put a significant load on the server.
what is the best method to use, whether it be an alternative to using session altogether, or an alternative implementation?
thanks in advance