emehrkay Posted December 12, 2006 Share Posted December 12, 2006 and building my menu from that. or querying the database everypage load and then building the menu system?I would assume the session var, but i dont want to overload it.any ideas?thanks Link to comment https://forums.phpfreaks.com/topic/30400-which-method-is-least-expensivestoring-an-array-of-20-30-vals-in-the-session/ Share on other sites More sharing options...
trq Posted December 12, 2006 Share Posted December 12, 2006 Id'e use the database. Sessions should really only hold data pertaining to the user who owns them.Better yet, if the menu rarely changes create a static html page of it from the data in the database and then use that. Link to comment https://forums.phpfreaks.com/topic/30400-which-method-is-least-expensivestoring-an-array-of-20-30-vals-in-the-session/#findComment-139894 Share on other sites More sharing options...
emehrkay Posted December 12, 2006 Author Share Posted December 12, 2006 i thought about making it static, but then i thought about adding features etc. and right now i have it based off of the user's role. i could easily make it static and then throw conditions in there. thanks for your insight Link to comment https://forums.phpfreaks.com/topic/30400-which-method-is-least-expensivestoring-an-array-of-20-30-vals-in-the-session/#findComment-139903 Share on other sites More sharing options...
craygo Posted December 12, 2006 Share Posted December 12, 2006 You could also flag the user in the database. Then store that flag in the session and point the user to the correct page based on the flag.Ray Link to comment https://forums.phpfreaks.com/topic/30400-which-method-is-least-expensivestoring-an-array-of-20-30-vals-in-the-session/#findComment-139906 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.