Another ‘design’ question.
(Technologies in use: PHP, MySQL)
I need to allow customers to customize the looks of their pages’ headers. What is the best way to store such customized headers (say pieces of html closed in a div). Is storing them in database any good?
Or would it be better to store them in php files and include them to each page instead of default header?
Or perhaps allowing users to edit html is a very bad idea and I should use some other means for allowing them to customize their headers? (mostly they use it to put a logo + some additional information, sometimes animated gif with advert, sometimes just text… no rule).
Please advise.
Storing them on the local filesystem is the most performant and simpler one, so you may want to go with this one.
However this will not be as good once you have to scale on multiple servers. The better solution then is to use some kind of shared storage (the mysql database solution), and to eventually cache the templates somewhere.