Here is my code so far
<hr width="50%" align="left" size="1" color="#FFFFFF">
<h2 class="updates" style="color:white">Replys</h2>
<?php
$reply = eregi_replace("boards","reply",$board);
$postid = array();
unset($SQL_replys,$result_replys,$row_replys);
$SQL_replys = "SELECT * FROM ". $reply ." WHERE replyid=".$row['id'];
$result_replys = @mysql_query($SQL_replys) or die("could not complete your query - get replys". mysql_error());
while($row_replys = mysql_fetch_array($result_replys)){
$postid[] = $row_replys['postid'];
}
if(count($postid) > 0) { ?>
<ul>
<?php for($i=0; $i < count($postid); $i++) {
$SQL_links = "SELECT * FROM ".$board." WHERE id=".$postid[$i]." ORDER BY -id";
$result_links = @mysql_query($SQL_links) or die("could not complete your query - get replys: ". mysql_error());
$row_links = mysql_fetch_array($result_links);
?>
<li>
<a href="<?php echo $pagename; ?>?boardid=<?php echo $boardid; ?>&c=rp<?php if ($_REQUEST['page'] > 0) { echo "&page=" . $_REQUEST['page']; } else { echo "&page=1"; } ?>&id=<?php echo $row_links['id']; ?>"><?php echo stripslashes($row_links['subject']); ?></a>
-
<strong><?php echo stripslashes($row_links['name']); ?></strong>
<em><?php echo stripslashes($row_links['date']); ?></em>
</li>
<?php
} ?>
</ul>
<?php } else{
echo "<ul><li>No Replys</li></ul>";
}
?>
<hr width="50%" align="left" size="1" color="#FFFFFF">
I have that in a file called replys.php and just have it included at the bottom of every message on my bulletin board, problem is though, to get a reply of a replied thread I need to go into that seperate message, is there anyway that I can do it so that it will go
Reply 1
Reply 1.1
Reply 2
Reply 2.1
Reply 2.2
Reply 2.2.1
e.t.c... hope i explained it well enough, so if anyone could help that'd be great
thanks in advance