A PHP example that lets your users edit content without HTML knowledge
Archive - Originally posted on "The Horse's Mouth" - 2010-02-14 08:00:44 - Graham EllisScenario one. I need a "todo" list page for our web site which I, and the rest of our team, can view and update quickly and easily.
Scenario two. Dave wants to provide his local cricket club's website with pages that the committee can update without them having to be trained / skilled in HTML, with each of the pages having the same look and feel, and without the risk of something silly being inserted into the page that will cause a major security breach.
Dave was with me for last week's PHP Course and we wrote a single page wiki demonstration ... which I have just modified and installed onto our live web server as a staff usage page for our team.



The Wiki demonstration code - it's only about 6k bytes - is [here] and there's a sample template [here]. That's even shorter. You'll need to rewrite URLs so that all your page names point to a single script if you're going to be using multiple pages within the system - we have a sample .htaccess file [here].
If you're already knowledgeable in PHP, you should find the script quite easy, but if you'ld like some help with this and many similar things, we cover it on our PHP Techniques Workshop.