Introduction

In this project you will begin making your own set of pages that will integrate with the contacts database on the cis9 server.  You need to complete prior assignments listed in the schedule to understand how to do this.

The cis9 server already has a simple database named contacts with the following fields in table contactinfo

num integer, auto-increment, primary key
firstname varchar(50)
lastname varchar(50)
phone char(13)
email varchar(100)
link varchar(150)

For this project, you will create a connection to contacts, create pages and a recordset, and display dynamic data.  View my example before you begin.

Database integration is complex and it can be tricky to troubleshoot problems, so be sure to TEST each step of the way. If you don't test frequently, you will have a difficult time identifying the source of errors.

Set Up

To begin, create a folder named contacts in your 213projects folder. Within this folder, you will eventually create the following files:

  • add.php
  • detail.php
  • list.php
  • update.php
  • search.php

 

In your Dreamweaver Site Definition, set cis9.cuyamaca.net as your testing server.

 

What to Do

  1. Create detail.php with 2-column layout and an external CSS that sets the page background color, text color, font face, AND link colors (link, visited, hover, and active).  You will attach this style sheet to each file.
  2. In detail.php, create a table like this:

    Name: (firstName & lastName data will go here)
    Phone Number: (phone data will go here)
    E-mail Address: (email data will go here)
    URL: (link data will go here)

  3. Create a connection to the contacts database. Name the connection connContacts.

    MySQL server: localhost
    Username: cs4admin
    Password: cis213
    Database: contacts
    TEST!


    IF YOU ARE UNABLE TO CONNECT, you may need to return to the site definition with the local testing server and use phpMyAdmin to create a contacts database locally. If you do this, either download and import the contacts.sql file into your local phpmyadmin or create your own using the settings shown at the top of the page. Set the privileges for user cs4admin, password cis213. That way when you upload to the server, the pages should work.
  4. In detail.php, create a recordset (rsContacts) that includes all the fields (columns) ordered by last name. Test the recordset and upload the contacts folder and Connections folder. 
  5. Add dynamic data to the 2nd column of the table you created in detail.php.
  6. Add a Recordset Navigation Bar to detail.php. This appears in the Data Insert menu above the document window.

    recordset navigation

  7. Make the Name a dynamic link by BINDING the link field to the href tag.  To do this:
    1. Select the code for the title dynamic data.
      Select

    2. Insert a # in the link box of the properties inspector – this will insert an href tag into the code.

    3. With the code still highlighted on the page, select the link field in the Data BINDINGS panel and click the Bind button.

      Bind

  8. Upload and test your work.  Your file should work like my example.  (It's ok if yours looks different.)

 

Submitting work

Grading - 50 points

Points Requirements

10

external CSS (background, font, links)

10

Connection

10

dynamic data in detail.php

10

navigation bar

10

dynamic link