Plain english eh? Oookay... :) Well it's pretty obvious you'll want to store the data somehow. I'd recommend using a MySQL database.
For a simple forum script you'll want to have two tables in your database. A Thread table and a Post table. The Thread table will store (threadid, username, subject title, date). The Post table will store (postid, threadid username, message, date). ThreadID will be be used in the Post table to connect each post with the right thread. When a user fills out the New Thread form and hits submit that information is stored in the Thread table. The message he adds will be stored in the Post table as the first post to that thread. When a user fills out the Reply form and hits submit that information is stored in the Post table. The threadid is recorded to match the post with that thread. Now when a user views the forum script it will extract all data from the Threads table and display a page of all threads linked to their threadids. So when a user clicks on a thread the script searches for that threadid in the Posts table and displays a page of all posts relating to that threadid. Bing Badda Boom... you've got yourself a quaint little forum script. But it doesn't do much yet. It just allows you to create threads and add posts to those threads. You may also want to have multiple forums in which case you would add a Forums table and a forumid column to the Threads table. The forumid relates to the threadid relates to the postid. Adding deletion, editing and search functions is trivial. User login and authentication is an entirely different discussion. Hope this helps, Kevin ----- Original Message ----- From: "Phil Schwarzmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 24, 2002 1:59 PM Subject: [PHP] bulletin board algorithm in php - how to write one? > I want to write a simple bulletin board in PHP. I want to use the > typical parent-child (it's sorted by both date AND thread) type of > bulletin board you see often on other websites. > > But I just can't figure out how to write some simple code to do this > and keep track of all the threads. > > Any ideas? I don't even need example code, just if someone could > quickly explain in plain english how to do it. > > Thanks!! > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php