Chapter 2. Community Forum

In the last chapter you saw what's necessary to put a user registration and account login system in place and came away with two pieces of reusable code: the User class and the 401.php include. In this chapter you'll see how they can be used as part of a larger project as you build a community forum. I'll also show you how to easily restrict different activities users can perform by incorporating permissions.

What you create in this chapter will not be a full-featured forum product capable of competing with other popular software available freely such as phpBB and Invision Power Board or commercially such as vBulletin. It's a basic foundation you can build on to create a custom forum expressly tailored to your needs.

Get PHP and MySQL®: Create-Modify-Reuse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.