Need help on saving website template settings

hello good people… I am working on project that require the admin to change the entire website design from a setting page. i.e logo, color theme, copyright etc. I have set the setting page and is ok…However I don’t have an idea on the best way to save the data so that any time the web page loads, it
loads the data as set by the admin in the setting page. I am only looking for a rough idea…I will appreciate. thank you…

Not quite sure what you are after but I would create a file called with all the settings and then use include “”; at the top of the page.

If you are talking about saving the data as it is modified online you could either write to a settings page from a form or save the form data into a database.

I think I would make that otherwise someone could potentially download the file.

Thank you for your answer… The setting page is only accessible via the admin panel…so I don’t think any one apart from admin can download the file…

Yes you kind of answered my question…but in the same page there a are some form fields which are generated dynamically and also color picker options…my question is how do I save this data…so that the colors loads in css in front panel and dynamically generated fields do not disappear in the back end when setting page is refreshed.

The settings file would be accessible by anyone if it is in the site root unless it were in a child directory with the proper htaccess access restrictions. I would recommend saving the settings to the database. A key/value pair table would be appropriate for global settings.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.