Specifically, we're going to create a threaded discussion forum. Why do we want a THREADED discussion forum? Well, it's simple: a threaded discussion forum allows a visitor to make multiple replies to the same topic in an ordered fashion. This gives us a discussion tree, with the topic being at the heart of it. The Code Our Forum is going to have four main pages:
We will need some additional files:
We will also create an "images" folder in the same directory. Here's the table for our forum: CREATE TABLE `test` ( The field called "uid" is a unique, autonumber field, which will identify each thread in the discussion forum. The field "parent" represents the ID of the parent thread for the current thread (if any), and will be 0 for all new threads. This structure gives us the ability to add as many replies to a thread as we like. Copy and paste the table structure in your phpAdmin client:
blog comments powered by Disqus |