Building a Threaded News System With PHP
(Page 1 of 4 )
Ever wanted to build a threaded news system? If so, this article is for you. In it, the Free2Code team show us how to do just that using PHP and MySQL...In this tutorial I'll explain how you can create a threaded discussion, just like you see in threaded forums across the Internet. Only, in my example, I'll show you how to do it with a "news" page that will have threaded comments.
This tutorial is intended for more experienced PHP users, but even intermediate PHP users should be able to follow because I've placed comments into each code sample.
Planning There are a couple things that we need to take into account to achieve this:
- News table: we need to associate each news post with its neighboring comments.
- Comments: we need to know which comment is a reply to which, so we can structure them correctly.
With that in mind, we need to design our tables...
Next: Creating the Tables >>
More MySQL Articles
More By Free2Code Team