CS531 02                                                       Assignment 3
Due 11/29/2017

Part I:

1. Setting up the Web Server, PHP, and MySQL on your laptop

Download and set up a web server that supports the PHP and a MySQL for hosting the PHP and MySQL database.
(You may use different port other than 8080 if the port is been used.)

2. Deploy and test the PHP and MySQL

Deploy and test a sample example from the server document.

Part II:

1. HTML/PHP Web pages

Design and develop Web pages with PHP to process the data from the winestore MySQL database. You must not assume that the user knows the SQL queries, so your GUI design can’t ask the user to enter the SQL commands.

Click the winestore.data link to download the SQL script to create the winestore database:

$mysql –u username –p

 >(type in password)

mysql> source winestore.data;

Finally you should add the WineStore web page on your club web site. 

2. PHP Scripts

1. Develop a query PHP script query.php to do the following: (see code examples on the lecture notes.)
- Process user query inputs; the query should access data in more than one tables.
- Send query to winestore MySQL database; use try/catch to display the database and network error messages.
- Display the query results in HTML5 Tables with alternative background color.

2. Develop a write PHP script write.php to do the following: (see code examples on the lecture notes.)
- Process user inputs command to insert, update, or delete data in more than one table.
- Send the command to winestore MySQL database; use try/catch to display the database and network error messages. 
- Display the write results in HTML5 Tables with alternative background color.

3. Email the query results (HTML5 table) to the user. (See code example on the class web site.)

Homework Hand in Policy:

1. Write a MS word report with the full screen shot that describes the major steps of your php GUI development process, ER diagram for the database tables that you have used, any problems that you have solved, and run results.
 Submit the report and your PHP source code files via Drop Box on the class Sakai web site before the due day.

2. Present your web/PHP pages to the class on the due day.