I'm developing site template software which will have an admin panel that will allow administrators to change certain settings such as background colors, fonts and static images on their site. I was thinking of using a mySQL database to store the settings, and PHP to perform the front-end duties. I have a few questions:
-Should I use mySQL for this, or is there a better more efficient way? I know that SQL is going to cause a greater hardware load than say flat files would. I'm worried that if the code pulls dozens of items from SQL for every page view that it could quickly consume all the hardware resources of the server.
-Can anyone give me some sample code in PHP that would allow a user to change a field named "font" in a table named "settings" in a database named "site1"? I'm not really up to snuff on SQL code yet, and a pertinent example would really help me get moving in the right direction. I learn by doing - not be reading. Just a simple text area box and a submit button will do perfectly!
Thanks!
Start Free Trial