Hi, new to the forum. Im building a site where articles can be created by staff. So is it better to save articles as html files on the server with PHP's file access methods or simply store the whole source code with all the tags in a database (MySQL). It should be accessible via link (without a GET would be nice).

Recommended Answers

All 4 Replies

Maybe you could store the articles as files, but keep track of their location, date, title and other searchable items in the database. ...but that depends on how the articles are to be searched and how long you will keep them.

So, it would be better to store the code itself in the html file? and use a database to index it? The articles are permenant.

Yes. That's one technique that should work well for a long time.

Thank you for the code! It's great to know HTML can do a basic calculation.

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.