Due: 27 Feb 2012, 11:59pm
AbstractIn this assignment, you will be adding a simple user system to the ongoing chat project and, instead of storing data in a file, storing data in MySQL. To save time, you should continue to use your chat system from Assignment 8 with your database from Assignment 9. If you were not able to finish either assignment or would prefer to not use your solution, you may use the Instructor Solutions for both assignments.
AssignmentThe following changes should be made to your solution from Assignment 8:
Examples of PHP's session functionality can be seen in the PHP class examples, inside the session_*.php files.
Examples of calling MySQL from PHP can be found in the MySQL class examples.
When determining the current date to store in the database, MySQL can set the current time with the value CURRENT_TIMESTAMP in your INSERT query.
To connect to the MySQL database, make sure your PHP files are on the class web server and use this connection string:
$db = new PDO("mysql:host=localhost;dbname=your_db_name");Notes
You are required to use PHP's PDO functionality for MySQL, not the older (and deprecated) mysql_ functions.
Homework SubmissionAs detailed on the homework submission page, this homework must be on the class web server in a folder titled homework10 for it to be graded.