Lab Outline week 8
What you will do in lab
Create a table for customer reviews.
Create an addReview page with a record insertion form
Modify the detail page to show the customer reviews.
Create a 'Reviews' Table
Columns: reviewID, movieID, userName, review.
Connect the Detail Page to the Add Review Page
Add a link like this one to your detail page, product.php:
Add your Review
Note: the php code is added by dragging movieID from the Bindings Panel and dropping it immediately after the URL parameter, movieID=
Create an addReview page
This page allows a user to add a Movie review.
- Create a new page, /382/php/addReview.php
- Add a recordset named "rsReview" for example. The recordset uses the movieID URL parameter to retrieve the movie being reviewed.
- Add a dynamic table: Insert > Data Objects > Dynamic Data > Dynamic Table. This will display the record for the movie being reviewed.
- Add a Record Insertion Form application object. Use a Record Insertion Form application object to create a form that enables visitors to enter a review into the Reviews table.
Insert > Data Objects > Insert Record > Record Insertion Form wizard.
The application object lets you select which fields to include in the form, label the fields, and select the types of form objects to insert. When a user enters data in the form fields and clicks the submit button, a new record is inserted in the database. You can also set a page to open after a record has successfully been submitted, so that the submitter knows that the database was updated.
For the destination page to open after the insert, you can choose any page you want. (An extra credit option on the final project will be to open the detail page again, this time showing the customer reviews including the review just added.)
The fields to display in the form are userName and review. For the review field in the form, select Text Area in the Display As pop-up menu.
Modify the detail page to show customer reviews
Add a recordset to product.php that retrieves all customer reviews for the movie shown on the detail page.
Add a dynamic table to product.php that shows the customer reviews for the movie shown on the detail page.
Labs Start On the Hour
Please arrive at 026 Kla early enough to be seated and do the following:
- start FireFox, login to our Blackboard course site, open Schedule > Class Calendar
- in the calendar, click the link for the lab outline for the week
- start Dreamweaver
If you arrive late, your lab instructor will not be able to take time away from the other students to fill you in on what you missed.