PHP/MySQL Web Development Using Dreamweaver

Master-detail page sets

So far we have a form that inserts records. We need a way to let people browse records in our file and see more detailed information about them. Dreamweaver has a feature called the master-detail page we will look at next.

Exercise 5

  1. Open up a new template page for the site.
  2. Change the page title to read "Master page."
  3. Save the file as "master.php"
  4. In the Server Behaviors window, click the little plus sign to add a the Recordset behavior.
  5. In the Recordset dialog box that opens, select the connection "DWphpClass," the table "dwphpclass_users" and click the Test button to test the connection. You should see any test records you entered.
  6. Press OK to save the connection.
  7. Get rid of the Lorem Ipsum text in the middle of the screen and use the Insert menu to choose Application Objects/Master Detail Page Set.
  8. In the dialog box that opens, use the remove key to get rid of the "u_id" field.
  9. Click on "u_mname" and then scroll down to the bottom of the list before shift-clicking the last item. (This should select the entire range of items.) Click the remove key to get rid of them.
  10. Type "detail.php" into the Detail page name field.
  11. Click OK to build your master-detail page set.
  12. You now have two pages. Since you started out with the template for the master page, it looks fairly presentable. Switch to the detail window and apply the template to that page as we did before.
  13. Save the detail page and upload it to the server.
  14. Preview the master page in your web browser to see your master detail page set work.

Watch "exercise 5 demo" to see your instructor power through the above. (time 4:24)

Take me to the next section...

Last updated: 02/20/2006 2:53 PM
©2006. The Trustees of Princeton University.