Lab
7
This lab is to test your knowledge
of being able to create PHP pages that display the data in your customer database, being able to add new customers, and to be able to delete customers.
Create a subfolder on your web server named "contacts". (This may already be done for you from doing the in class exercises.)
Under the subfolder "contacts" that you just created, you will need to create several files. The names are of your choosing. In my example, I called them "form.php", "add.php", "delete.php", and "edit.php"..
The lab must contain several items.
Your resulting output should like similar to this.
Title your pages.
Put captions on the top of your pages.
Add a background.
On the first page. I named mine "form.php". :
- Display the records of your customer table approximately 5 - 10 records at a time.
- Set up paging links.
- Set up a recordset count.
- Create a form.
- On the form allow the user to be able to sort by geographic location and name. (Hand coding required)
Create a php file to add users. I named mine "add.php".:
- Be able to add customers to your customer table. You should be able to enter all fields, EXCEPT the ID field. The ID field is autogenerated/incremented.
- Have the page reload itself to add multiple customers in succession.
- Have a link to return to the customer list.
- Hint: You may need to use phpMyAdmin to allow "null" fields for some fields that you don't feel are neccessary to be filled out.
Create a php file to delete a customer. I named mine "delete.php".:
- Before actually deleting the customer, confirm the deletion first. Do this by making another variable that you check for and pass as a $_GET variable.
- After you delete the customer record, go back to the main customer listings.
Create a php file to edit users. I named mine "edit.php".:
- Be able to change a customer record. You should be able to edit all fields, EXCEPT the ID field.
- Have a link to return to the customer list.
- Hint: You may need to use phpMyAdmin to allow "null" fields for some fields that you don't feel are neccessary to be filled out.
Assignment is due 1 week from when it was assigned. 50% penalty if late.
MMDT1146 Lab 7
Grading Criteria
Date |
Possible
Points
25 |
Your
Points
25 |
Display of customer records. (form.php) |
4 |
4 |
Paging Links. (form.php) |
2 |
2 |
Recordset count. (form.php) |
2 |
2 |
Able to add customers. (add.php) |
4 |
4 |
Page reloads itself in succession. (add.php) |
1 |
1 |
Confirmation of deletion of a customer. (delete.php) |
4 |
4 |
Deletion of a customer. (delete.php) |
4 |
4 |
Edit record of a customer. (edit.php) |
4 |
4 |
|