Entry
How can I store session data for a user?
How can I keep track of a user and their data?
Mar 19th, 2000 20:11
Dave Garth,
If php isn't compiled as a mod for apache http authentication wont work.
In order to authenticate users and then keep track of them and their
data I gave each user a sessionID which was created using $sessionID =
uniqid(rand()). The sessionID was stored on their computer using a
cookie with a short expiry, and every time they visited a page on my
site it would be refreshed. Any data associated with that user would be
stored in a database, and then retrieved every time it was needed.
Table Session
varchar SessionID
varchar Variable
varchar Value