You are to develop from the beginning a web site for the guitar shop example of the unit. This web site relies on the guitar shop database of the text book. It provides the user with pages allowing them to work enter certain information for use with this database.
You will design and develop your web site with NetBeans or Notepad++ using PHP, HTML and Cascading Style Sheets.
This assignment is worth 25% of the total marks for the unit. Students complete the assignment in groups (pairs).
The purpose of this assignment is for you to build a small Web site for the guitar shop example used in this unit. Your site provides forms for working with information from the database. The guitar shop data comes from the database, my_guitar_shop2, that was installed in Lab 4. You may need to re-run the script provided in that lab to carry out the assignment if it is not available on your computer. The site allows two options to the user when interacting with your site, and you must program both options. The user can use the site to either:
1. enter data for a new system/database administrator who can use the database, or
2. enter data about a new order, for ordering products from the guitar shop
Your site needs to support both options (both functions), but the user chooses whether to take option 1 next or option 2 next. In reality, you would not develop a system exactly as described in this assignment (you would not have a user who would add an administrator as well as be a customer entering order details), but are developing it for the purposes of this assignment.
This assignment involves creation of PHP files corresponding to 4 pages of your web site and all are connected to an external CSS file. You will need to determine how your site will be designed and then you will develop the pages using PHP, HTML and CSS. The pages and CSS file you will develop are explained below.
Page for selecting entering administrator details or entering order
The first page of your site the user sees will be as follows (we will ignore use of a home page in this assignment). The user will see a heading conveying what this page is about. The page will allow the user to either select the option of entering in the details of a new system or database administrator (we will refer to them as an “administrator”), or alternatively, entering details about a new order of instruments as the same time; the user must select either to add a new administrator’s details or to enter details about a new order.
Selecting an option is based on an HTML form, so the user is presented with a brief form presenting both these options. The method of selecting an option requires a form and not some other way that excludes a form, otherwise marks cannot be awarded for this criterion.
Before an option is selected, there must be a paragraph above the form explaining to the user about selecting one of the two options.
Page for administrator entry
If the user selects the option of adding a new administrator, then the next page of your site the user sees will be the page for administrator entry. Include a heading to convey what this page is about. The user will be presented with a form that contains fields for the following details of the administrator in this page:
Your script must verify that what was entered into email address text box is indeed in correct email address format, otherwise must give an error message and ask user to re-enter correct email address.
Once all details of the administrator have been correctly entered and submitted, a brand new feedback page is shown in the browser to replace the page for administrator entry. This feedback page displays the following text in blue colour to the user:
The new administrator, Mary Smith, with email address, [email protected]e.com, has been added to the database.
where the actual administrator’s details that the user enters are substituted for the name and email address above. Your message should look exactly as it does above with the same formatting.
Page for order details
This page is similar to the page for administrator entry in that it also contains a form. Include a heading to convey what this page is about. However, in this page the following details are entered by the customer:
1. pull-down menu of customers currently in database
2. total amount of order in dollars
3. a particular credit card from a set of credit cards (Mastercard, etc.)
4. credit card number
5. expiry date, including both month and year
The user uses the pull-down menu (1. above) of customers in database to select who they are so that their order details can be added to the database.
The credit card number entered is verified that it is 16 digits in length. If this is not the case, a message is provided to the user to explain what the problem is and that they need to re-enter the card number.
The user enters the total of the order (2. above), but this data is not inserted into the orders table. The total amount is used to carry out the following two activities.
Determine the amount for shipping the order. The amount for shipping is worked out using the following information: Order total
Amount for shipping
$0 − $199
$200 − $399
$400 − $599
$600 − $799