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.
This project must be done individually. No copying is permitted. Note: We will use a system for detecting software plagiarism, called Moss, which is an automatic system for determining the similarity of programs. That is, your program will be compared with the programs of the other students in class as well as with the programs submitted in previous years.
Note that, if you use a Search Engine to find similar programs on the web, we will find these programs too. So don't do it because you will get caught and you will get an F in the course (this is cheating). Don't look for code to use for your project on the web or from other students (current or past). Just do your project alone using the help given in this project description and from your instructor only.
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/cse5335/project5.tgz tar xfz project5.tgz cp project4/.htaccess project4/.htpasswd project5/ cd project5The project5 directory contains the file createDB.sql, which contains the SQL description of 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 mydb.sqlite select * from users; .exit
The project5 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.
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 a comment on top of your board.php file, put your name, your student ID, and your URL address to run your web application, such as http://omega.uta.edu/~xyz1234/project5/board.php. Use the form below to submit your PHP file(s). 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: 03/05/14 by Leonidas Fegaras