A Final PHP Project
There is no form for a new member to sign up to the forum. Write the code for this, and add links to the signup page in the rest of the forum. Here's a few things you'll need to bear in mind.
- The Table is called members
- Primary Key is in the format mem1, mem2, mem3, etc
- You'll need to build up string for your INSERT INTO SQL
- Use PHP to create the Form. Look at the code for replyForm.php and postForm.php to see how to do this. You'll need to add textboxes for the username and password, and one for the email address. The fields in the members table are:
memberID
username
password
signupDate
email
- The form will need to be posted somewhere. You can create a new php page for this. Add the SQL function, and the rest of the code, just like we did above.
- You need to bear in mind that the Primary Key in the members table is just like the threadID field, only with mem before the number instead of pos. You'll have to code for this, to make sure you're adding a new row, and not trying to overwrite an existing one
- To add the links to the signup page, you'll need to amend the code in a few of the pages in the forum, such as pageReply.php. A simple hyperlink to your new signup page should do
Play around with the rest of the forum, and see what you can come up with. At the very least, you should be able to improve the look and feel of the forum. If you know any CSS, you can always try to add some to the code.
Speaking of the code, any errors you need to correct in the forum? Most likely. In a larger web application like this, you'll always find a bug or three! And don't forget to keep a copy of the origianl code.
But that completes not only the forum, but the whole beginners PHP course. We hope you enjoyed it, and are motivated to take your new skills on to the next level. Good luck!