Welcome to WebmasterWorld Guest from 54.221.136.62

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Reading User Settings / Control Panel

     
8:33 pm on Mar 8, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 17, 2002
posts:1187
votes: 6


I want to give users the option of displaying tables in a certain way (colours, sort options, amount of info displayed etc.)

The users will be able to change the settings via a control panel function which will then be stored in a mysql database.

That bit is fine but I don't know which is the best method of retrieving and acting upon that data.

1. User changes the default look and feel of reports in their control panel.
2. User requests a report.
3. User Database is queeried and user settings returned.
4. Report database queeried and a report generated in the users required format.

It is option 3. which I think is a bit of a waste. Every time the user requests a report his settings are called from the user database.

Is it best to load the users settings when he first logs in? Would this be done in cookies or sessions?

There would be around 20 parameters which would be stored. I'm looking for the most efficient way of handling this.

8:37 pm on Mar 8, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 29, 2004
posts:194
votes: 0


You can store all of your variables in the session, and call them from there. You can also check to see if they are actually in the session before you pull them, and if not, query the database as a last resort, and store them in the session at that point.
8:38 pm on Mar 8, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Apr 27, 2003
posts:243
votes: 0


You could "do it on the fly", but if its every page that they need to query the database, I would definitely recommend storing the data in php $_SESSION variables when they first login. Good luck!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members