Free: Using Advanced HTML Editor to Create a Content Management System Support

In this free, 20 page tutorial, Matt Machell shows you how to use Dreamweaver server behaviours and the DMXzone Advanced HTML Editor extension to build a password-protected Content Management Solution for a web site, that allows normal users to read news or text or whatever you choose to put on your site, while users with the correct password can add or amend the text using an intuitive word processor-like administration system - so your clients can maintain their own web sites without having to know HTML and without risking breaking the look and feel of the site!

Because Matt's using the extension and built-in server behaviours, there's no handcoding involved, so matt shows you how to use it using both ASP and PHP.

Finishing Off

The basic news system is now finished. You can add and update news items using a WYSIWYG tool. Upload your files and you should be able to test the pages. Try styling a paragraph in the sideblock class, and you'll see some of the more advanced formatting that can be achieved by combining CSS styles and the Advanced HTML Editor.

Obviously there are a few tweaks you could make to the system. At the moment new users are added directly into the database. You'd need to add a set of pages for creating new users. Unsurprisingly, this is very similar to the news insertion page, except with username and password fields.

Doing it all in PHP/MySQL

Since Advanced HTML Editor works with any type of form, you can also integrate it into any PHP application you are creating. To convert the example application into PHP, the main difference will be the database tables (since everything else is done via server behaviors). MySQL has a slightly different implementation of SQL to SQL Server, so we would create our tables differently.

The database cms_news would be created with the following SQL (you can use your favourite admin tool, I prefer PHPMyAdmin):

    CREATE TABLE cms_news (
news_item TEXT NOT NULL ,
news_live CHAR( 1 ) DEFAULT 'n' NOT NULL ,

and cms_users would be created with the following SQL:

    CREATE TABLE cms_users (
      cms_user VARCHAR(20) NOT NULL,
      cms_pass VARCHAR(20) NOT NULL,
      PRIMARY KEY (id)

Also MySQL uses a LIMIT clause after a query to limit the number of rows returned rather than TOP. Other than that – using Server Behaviors and Advanced HTML Editor, we've made a working password-restricted content management system, with an intuitive word processor-like interface in record time – and, once you own the Advanced HTML Editor, you can include it in any number of forms on any number of sites.

As Jazz fans say: nice!

Matt Machell

Matt MachellA man of many talents, Matt has been a web designer, technical editor, and jewellery picker. He is currently on contract for the Birmingham City University, producing pages for research centres.

He has tech-edited a dozen books on web design and development for glasshaus, Apress and Sitepoint.

He likes music with loud guitars and games with obscure rules.

His website can be found at:

He lives in Birmingham with his girlfriend, Frances, and a horde of spider plants.

See All Postings From Matt Machell >>