Starting from:
$29.99

$23.99

Assignment #9: PHP Programming, MySQL, and the Address Book Solution

Task: The purpose of this assignment (an extension of assignment 8) is to illustrate the use of PHP as a server side programming language that processes form submission data and then stores it in a MySQL database.  In addition, we will also explore the basic CRUD operations that SQL provides when working with a RDBMS.

Problem Statement:

You will have to write a webpage PHP script file that captures address information via a form element that when submitted, stores the address information in a database.  The data submitted will then be sent directly to the same PHP file that generated your address entry form.  In addition, your webpage PHP script file also needs to provide the ability to display all address items currently contained in the database as well.

Functionality:  

Adding address information:  As before, your form should validate any null (blank) entries except for Address Line 2 and not allow submission until all entries have been filled in.  Once, submitted your PHP script should open a connection to your database and then insert the address information into your address book table.   Upon successful insertion into the database, the form should display again with a confirmation message that the address was successfully added to your address book.

Displaying your address book:  Your form should include an additional submit button that when clicked, causes your PHP file to retrieve all your address book entries and displays them in an HTML table at the bottom of your page.  The addresses should be sorted by Last Name followed by First Name. 

Note: DO NOT use the XMLHttpRequest object for this assignment.  Your PHP file should handle all scenarios.  Enter four random names/addresses followed by yours so that your name appears in the middle of address list response.

 

Grading Criteria:

1.       Your CSS code in a seperate file that passes the CSS validator checks - 5 points.

2.       Your one and only one PHP script that echos back the address entry response and your address book contents– 35 points.

3.       Your Javascript code in a separate file – 5 points.

4.       Your SQL code that creates your addressbook table corresponding to the address entries – 10 points.

5.       Correct submission format – 5 points.

6.       A screenshot that captures the address entry response result: 5 – points

7.       A screenshot that captures your address book with your name listed in the middle: 10 points

 

Submission Instructions:

Your submission should be packaged in a tarball  or zip file. When opened,  it must  create  a directory titled  ‘<UMN internet ID’ containing  all of your files.   UMN internet id should be your x.500 id. You will lose AT LEAST 5 points if you do not do this correctly. Include all the files we require to run your Web Pages in your the following files in your submission including pictures and external JavaScript files.  Your submission should include the following:

• A single PHP file containing your code. • A CSS stylesheet containing your code • A JavaScript file containing your validation code • Your SQL code that you used to create your address book table • Screenshots of your address entry results and a listing of your address book contents• A README file: the file should include your student ID, name, and x500 ID, and anything else you want

More products