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. This program will find similarities even if you rename variables, move code, change code structure, etc.
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). Don't try to hire a freelancer to do the coding for you. Just do your project alone using the help given in this project description and from your instructor and GTA 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/project4.tgz tar xfz project4.tgz cp project3/.htaccess project3/.htpasswd project4/ chmod o+w project4 chmod o+w project4/mydb.sqlite cd project4The project4 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, follows, datetime, message )Primary keys: users.username and posts.id
sqlite3 mydb.sqlite select * from users; .exit
The project4 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 4 web pages (can be from the same script or you can split it into 4 different php scripts):
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/project4/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: 09/10/14 by Leonidas Fegaras