elad135 Posted March 23, 2011 Share Posted March 23, 2011 I'm kinda new to PHP programming and I'm working on a large project at my university. Currently I'm working on adding as many choices to the Admin account so he could customize the site to his needs. All I wanted to know is what is the customary way in most sites to save these customization settings? Should I just put them in the database? Or maybe save them in a file (XML or some other kind)? Been scouring Google to find some information but didn't get anything useful so hopefully someone here could help me figure this out. Quote Link to comment https://forums.phpfreaks.com/topic/231481-saving-sites-settings/ Share on other sites More sharing options...
trq Posted March 23, 2011 Share Posted March 23, 2011 A database is likely the easiest option. Quote Link to comment https://forums.phpfreaks.com/topic/231481-saving-sites-settings/#findComment-1191257 Share on other sites More sharing options...
elad135 Posted March 23, 2011 Author Share Posted March 23, 2011 Ok, that was what I thought of doing at first. So I'll save the settings in the database. Now, what's the best way to pull them and have them available to me on every page? Should I have a Settings.php that I'll include in every page, with variables that would be initialized to the settings from the database? Should I store the settings from the database in session variables on user login? Maybe some other way I haven't thought about? Quote Link to comment https://forums.phpfreaks.com/topic/231481-saving-sites-settings/#findComment-1191443 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.