· 9 years ago · Sep 15, 2017, 11:46 PM
1
2Option A: User Accounts
31. Create a basic web page named lastname-hw9.php using best coding practices.
42. Use Your Name: Homework #9 as the title of the web page. Replace the phrase Your Name in this step and in all following steps with your actual first and last names.
53. The page should contain:
6a. Enough text and formatting to make it a meaningful user management page for a web site for an organization of your own choosing.
7b. 3 links:
8i. Create an Account that links to lastname-hw9a.php
9ii. Update my Account Info that links to lastname-hw9b. php
10iii. Delete my Account that links to lastname-hw9c. php
114. The Create an Account page should have your name in the title and allow users to enter a username, first and last name information, address information, email information, and a phone number.
125. When the form is submitted, a new record should be created in the dbUsers## database stored in MySQL on the webdev server.
13a. Note that ## corresponds to your user number, so if you are 133stu99, you would be working with dbUsers99 on MySQL.
14b. The dbUsers## database contains a tblUsers table with the following fields:
15i. userName (primary key, text data, maximum of 20 characters)
16ii. userPass (text data, maximum of 16 characters)
17iii. firstName (text data, maximum of 20 characters)
18iv. lastName (text data, maximum of 20 characters)
19v. address (text data, maximum of 50 characters)
20vi. city (text data, maximum of 30 characters)
21vii. state (text data, maximum of 2 characters)
22viii. zip (text data, maximum of 10 characters)
23ix. email (text data, maximum of 30 characters)
24x. phone (text data, maximum of 15 characters)
25c. Note also that the username should be checked before submitting to ensure that it has not already been taken by another user.
266. The Update my Account Info page should contain your name in the title and allow users to enter their username. After entering their user name, the other information in the user's record should display in form fields on the page. The user may edit the information, and then, when the form is submitted, his or her record should be updated with the current information.
277. The Delete my Account page should contain your name in the title and allow users to enter their username, and then choose to delete the record. Note that the page should check that the user exists before attempting to delete the record!
28
29
30Option B: Database Interactions of Your Choice
311. Create a new MySQL database with a least one table by copying the code from the Extra - Creating MySQL databases & tables through PHP folder on blackboard to a page you upload into your 133stu## account. Follow the SQL examples on the page to make the database and tables.
322. Create a basic web page named lastname-hw9.php using best coding practices.
333. Use Your Name: Homework #9 as the title of the web page. Replace the phrase Your Name in this step and in all following steps with your actual first and last names.
344. Add database connectivity in a functional way to this page, or other related pages. At a minimum, you will need to:
35a. Display data stored in the database in a nicely formatted way on a web page. (Inventory list? Registered users? Schedule of classes?)
36b. Allow users to add data into the database (Place an order? Register for a class? Add a new part to inventory?)
37c. Allow users to select a record from the database to edit, then update the database with those changes. (Change an order? Change personal information? Change the price of a part?)
38d. Allow users to delete a record from the database. (Drop all classes? Cancel an order? Remove a part from inventory?)
395. The pages should all display sufficient headings, text directions, and images to be meaningful. The intent of each page should be clear.
406. The lastname-hw9.php page should contain links to all of the necessary pages that demonstrate each required element from step #4.
41How to Submit
42• Be sure to appropriately comment your code, adding a comment to each variable, function and/or important calculation statement to describe its purpose.
43• Test and debug your page as necessary. Upload the final product to your folder on WebDev.
44• Print out the code view of your efforts. Clearly print the URL to the file on the top of your printout and submit for evaluation.