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.
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:
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