Problem Statement:
The Humungo Studios Video database has been created and populated (in
your last assignment). Now, you are asked to make an interface that
customers can use to access the database from the web to do the following:
Main Page:
The opening page of this web site should provide the following
functionality:
Customer Registration Page:
When the customer clicks on the link to register, the Customer
Registration Page should ask for First Name, Last Name, Address and Credit
Card to be submitted. The following screen shot shows the minimal
required information for this page:
Submitting this information should enter the data into the database, adding an entry into the Shopper table in the database. Upon submitting the data, a new page should appear with the newly entered customer information displayed.
These pages should each have a link back to the main page.
Existing Customer Page:
When the customer enters an existing Customer Number on the main page
and submits, a new page should open that displays the shopping cart for
this customer. (See screen shot below)
In case the customer number that was entered does not exist, the new page should display a message indicating that no such number exists.
These pages should each have a link back to the main page.
Search Results Page:
When the customer enters a name or title in the search box on the main
page and submits the query, a new page should be displayed with the
results of the search. (See screen shot below)
For each matching Actor, Film, Director, or Studio, the page should provide a link to display more. For example, the screen shot above shows the results of searching for the string "HE". Clicking on the actor CHARLIE SHEEN should produce a page (Actor Information Page) listing all of the films that Charlie Sheen has appeared in. (See screen shot below)
Similarly, clicking on the link for the film THE PRINCESS BRIDE should produce a page (Film Information Page) that lists information about the film.
Each of the pages above should have a link to return to the main page.
Actor Infomormation Page:
Any time a link to an actor's name is chosen, the Actor Information
Page should appear. This page should list the "Filmography" for the
chosen actor, listing the titles of all of the films that the actor has
appeared in. Each of the films should provide a link to the Film
Information Page for that film.
Film Information Page:
When a customer clicks on the title of a film, the Film Information
Page associated with that film should appear. This page should include
the following information:
Video or DVD Purchase Page:
When a customer clicks on a link to purchase a video or a DVD from a
Film Information Page, a new page should appear. This page should request
the Customer number (it is not required that your application remember if
a customer number was previously entered). The page should also display
the title and price of the film that is being added. Once the customer
number is submitted, a new page with the new shopping cart should be
displayed.
Extra Credit:
For extra credit, create a page that allows a user to enter the names
of two actors, and write php code to access the database to determine the
"degree of separation" between the two actors. The degree of separation
between a pair of actors is the number of links from actor to film to
actor that you have to traverse to get from the first actor to the second.
For instance, Demi Moore was in A Few Good Men with Kevin Bacon, so
the
degree of separation between Demi Moore and Kevin Bacon is 1. However,
the degree of separation between Robin Wright and Demi Moore is 3 because
Robin Wright was in Forrest Gump with Tom Hanks, who was in
Apollo 13 with
Kevin Bacon, who was in A Few Good Men with Demo Moore.
The page should have two text boxes and a submit button that calculates the degree of separation.
You are to turn in a report that includes the following:
Instructions for Setting up the your Web Site:
We have assembled a set of insructions for setting up the
your web site on the department web server. Find these instructions
here.
You are not required to use the department web server. As long as your
web server is enable to handle php scripts, you may
store it on any
machine that you have available.
PostgreSQL/PHP On-Line Documentation