This project must be done individually. No copying is permitted. The goal of this project is to learn server-side web programming using PHP and a relational database system (SQLite). More specifically, you will create a message board where registered users can post messages.
As in the previous projects, you will develop this project on the Omega web server and you will test the project on your PC/laptop using the Mozilla Firefox web browser. Login at omega.uta.edu using SSH and do the following:
cd public_html wget http://lambda.uta.edu/cse4392/project6.tgz tar xfz project6.tgz cp project5/.htaccess project5/.htpasswd project6/ cd project6The project6 directory contains the file createDB.sql, which contains the SQL statements to create the tables: users and posts, that have the following schema:
users ( username, password, fullname, email ) posts ( id, postedby, datetime, message )Primary keys: users.username and posts.id
sqlite3 /tmp/xyz1234.sqlite .read createDB.sql .exit chmod o+w /tmp/xyz1234.sqlite(change xyz1234 to be your own username).
The project6 directory also contains the file board.php, which needs to be changed as described in the description of the web application. The board.php file uses the PDO extension of PHP to insert a new user and to query the users table using SQLite. Note: you need to change the $username in board.php to be your own username.
The following are tutorials on PDO and SQLite. Use them as a reference only.
Your script board.php must be able to produce 3 kinds of web pages:
For each posted message, you print:
Hints: Use md5 to encode passwords in PHP. Use uniqid to generate a unique id in PHP. Use the SQLite function datetime('now') to compute the current date and time.
Important: In the comment on top of your board.php file, put the URL address to run your web application, such as http://omega.uta.edu/~xyz1234/project6/board.php. Use the form below to submit your PHP files. We do not accept email or hardcopy submissions. You may submit your files as many times as you like, but only the most recently submitted files will be retained and evaluated (newly submitted files replace the old files under the same file name). After you submit the files, please double-check that your submitted files are correct by clicking on the Status link.Last modified: 11/07/13 by Leonidas Fegaras