Hello

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

Recommended Answers

All 4 Replies

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?

Member Avatar for diafol

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)?

Member Avatar for diafol

Of course.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.