setting/reading user preferences

A

Anonymous

Guest
Hello, Im currently working on a message board where users can change things like style and number of messages displayed. The thing is, i want these preferences to be rememberd by the message board so next time a user logs in, the settings they made will be shown. So for each user his/her own preferences.

Im using sessions to store login information. I was thinking of storing the preferences in a MySQL table and to put these preferences in session vars as soon as a user logs in so I could use these later on... is this a good idea or are there faster/better/more portable ways of doing this??

Thanks in advance,

P3x
 
Using sessions is not necessarily faster than storing the data in a database, as session data is just stored on the disk. I think it's really a matter of preference. If you're already retrieving user data from the database on every page, you might as well retrieve the settings with the same query.
 
Back
Top