You are seeing this very light version of the page, as you are using an outdated browser!

Onlinetools.org is done in XHTML 1.0 and supports CSS 2.0, please upgrade your browser if you want a better version of this site.

Thank you, please help us developers keep up with the industry rather than patching our code for outdated applications.

open or close right navigation

How to create editable web sites in PHP

 
written by:Christian Heilmann on 26.04.2002
Jump to page: 1  2  3  4  5  6  or read all on one page
 

Goodies and limits

Ok, now you know how to create a page that can be edited in PHP. This trick is no rocket science but is has some advantages:

  1. It does not require any database
  2. It's all in one script - displayer, editor and content change routine
  3. It's small and easy to include
  4. It's safe, as the password is only in the document and never printed

Limits:

This trick only allows people to enter copy that is plain text and do linebreaks. Any other layout functionality has to be coded seperately, or if you remove the "$content = htmlentities($content);" line you can allow people to use HTML in their text.

Furthermore it can get nasty when more than one user writes in this editor at the same time, the text can get truncated or storing it might not be possible.

To download the files of this example as a zip click here.

Table of contents:

Introduction, what is this about?
Separation is necessary
The template with the script
What the script does
Adding secured interactivity
Goodies and limits

Back to top

Powered by EasyCMS