ull probably need a table to hold the info of the posts, and what thread they belong to...
this is sort of how i have mine set up
threads
id | title | author | lastpost | priority
where priority is used to hold things like regular, stickied or announcement
posts
id | thread | author | date | time | subject | content
so id have something like
threads:
1 | PHPBuilder Rocks! | pjleonhardt | 83472302 | 2
2 | My Own Forum! | pjleonhardt | 83492302 | 1
posts:
1 | 1 | pjleonhardt | 12/23/03 | 1:50 AM | I concur! | Yeah it so does rock.. blah blah
2 | 2 | pjleonhardt | 12/24/03 | 1:52 AM | I made it! | I finally finished making my own forum!!
etc...
the thread column points to the id number of the thread it belongs to..
so on your viewthread page...
you would do something like
viewthread.php?t=1
<?
$thread = $_GET['t'];
include("dbconnect.php");
$query = mysql_query("SELECT * FROM posts WHERE thread = " . $thread);
while($r = mysql_fetch_assoc($query))
{
//populate table of posts
}
?>