How can you store a theme(css jquery html) in a database and retrieve it using php and jquery ajax

Can this be done in json and what advantages are with this tehnology,I am new to json and don't know that is why I am asking

any ideas will be welcomed.

Thank you

6 Years
Discussion Span
Last Post by diafol

This question makes no sense at all, what do you mean by 'theme'?

Why not just have a folder (Let's call it "themes") that stores all the documents to that particular theme then store the file path to that theme in the database?


There's no problem with storing bits of code or markup in a db. However, files are usually easier for scripts and css. I agree with phorce. Just store paths tp filenames. If you're working qith wysiwyg editors, it's just as easy to read/write to a file as it is to update a db record.


Than you for the idea can I make it to load a style without refresh to use a drop down list with json or jquery+ajax statements that selects a style form the database(path to style)?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.