Record Store Part 2–PHP version
Matt Brown
Table of Contents
If you are taking this tutorial, you probably have spent some time with Macromedia Dreamweaver MX and understand it enough to use it as you need to. Take this opportunity to apply those skills and add to them using the PHP application server model. User authentication was added to Dreamweaver in Dreamweaver MX 2004 on the PHP platform, but the user interface for user authentication may be slightly different than described in the article. To access the user authentication server behaviors in MX 2004 and 8, select plus (+) > User Authentication in the Server Behaviors panel. If you are using Dreamweaver MX, you will need the PHP user authentication extension, which you can get here.
The first part of the Record Store tutorial taught you how to use templates to create a PHP site for a small store. You connected to a database and returned records. You created an administrative section where you could add or change CD information. These are the basic functions you would want in any application.
However there were several features missing from that beginning application. Without user authentication, a user could access your administrative pages change the information simply by knowing your administration URL. Also, the tutorial did not teach you how to give users a search function to find CDs. Lastly, the database provided with the tutorial is small. Soon, you would outgrow a single page catalog, and customers would need to be able to have some way to find a particular album.
In this tutorial, you will add user authentication through a login page for the administrative site portions. Next, you will add a search function that will search for CDs in the database and return those records to the same page as the catalog. Finally, you will learn how to plan the search functionality and how to prevent search implementation mistakes. When you finish this tutorial, you will be ready to take your PHP site to the next level to create a moderately complex application for PHP in Dreamweaver MX.
In this intermediate tutorial, you will manually write the code to create efficient pages. This will give you a chance to learn how to use the built-in manual coding features in Dreamweaver MX. I will guide you through most of the code. If you do find any of the coding too difficult or tedious, you can simply paste the code from the tutorial into your pages and browse application as an end-user.