Dreamweaver MX 2004 PHP Server Behaviors

In today's tutorial we will be taking a look at creating a log in system using PHP Server Behaviors. Our system will provide an admin area for creating/editing and deleting users from the system, as well as the log in system itself. We'll be working with the newly released Dreamweaver MX 2004 for this article, as this will give us the opportunity to work with the new user authentication Server Behaviors that have been introduced with MX 2004.

After reading this tutorial, you'll be able to:

1. Create a table of users who could log into the site, along with their respective user access levels 2. Create a login page that authenticated users against that database table using the Log In User server behavior 3. Use the Restrict Access To Page server behavior, along with some of our own code to redirect authenticated users to the correct areas of our site 4. Use the Restrict Access To Page server behavior with defined access levels to make sure that only Admin users could access the admin section of the site 5. Use the Master-Detail Page Set application object to create a structure for the admin pages.

- OR -


Table of Content:

  • Our users database
  • Adding some data to start with
  • Creating the login page
  • The users page
  • admin.php
  • Admin page structure
  • Conclusion

Allan Kent

Allan KentAllan comes from Cape Town, South Africa. He has been implicated in writing for several WROX, glasshaus, Wiley and Apress publications, generally in the 'cool stuff that PHP can do' sections.

You can catch up with him at his website http://www.mediafrenzy.co.za.

See All Postings From Allan Kent >>


Great Article

March 31, 2006 by John Cordeiro
I was having trouble getting the php server behavior to act the way I needed it to. This article explained all I needed to make my own members section on my web site using only Dreamweaver MX, PHP_MySQL server model and the PHP User Authentication server behavior. Thanks, John Cordeiro

Errors - with the session

November 14, 2007 by J Ross

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /data01/mysite/public_html/testsite/Connections/connection.php:3) in /data01/mysite/public_html/testsite/logon.php on line 35

Not quite sure why this is but I have been on the forums and it is suggested that the session variable must be the first thing that the page sees - with no white space.

I have moved all the <?php ...?> bits around and nearly got it to work but to no avial. 

It works OK on my wamp testing server but not on my isp site. Can anyone help with this. 


You must me logged in to write a review.