The goal of this project is to learn server-side web programming using PHP and a relational database system (MySQL). 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 your PC/laptop using XAMPP and you will test it using using your Mozilla Firefox web browser. Download the project4 files: project4.tgz (for Linux and OS X) or project4.zip (for Windows). Unarchive the files inside your web server document root directory. The 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
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 MySQL.
Please read The PHP Data Objects (PDO) extension, especially the PDO class.
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 MySQL function now() to compute the current date and time.
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/04/15 by Leonidas Fegaras