Newbie here, so go easy on my code! I know it's a mess, but I'm just learning!
I have the code that is shown below, all of the PHP works fine, but my problem is when I incorperate my HTML tables into it and the output is displayed the tables shoot about two pages down the browser so that you have to scroll to see the output. I've tried it in a different way with a single table and that displays normally, but with this configuration it comes out very strangely.
I think it has something to do with the while loop, but I can't see where the problem is.
If that made sense to anyone, please help!
Thanks in advance!
<?php virtual ("menu.php"); ?>
<?php
require('pagedresults.php');
$cnx = @mysql_connect('localhost','jclickth_admin','l1verp00l');
mysql_select_db('jclickth_forum',$cnx);
$rs = new MySQLPagedResultSet("select * from threads WHERE $id = id || $id = postid ORDER BY id", 25,$cnx);
?><font face=verdana size=2><center><?=$rs->getPageNav("id=$id")?></center><br>
<?php
echo ("<font face = verdana size = 1><a href=\"postreply.php?id=$id\">Post Reply</a>");
echo ("<table border=\"0\" valign=\"top\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\">");
while ($row = $rs->fetchArray()):
$id = id;
$userid = $row["userid"];
$title = $row["title"];
$output = htmlentities($title, ENT_QUOTES);
$text = $row["text"];
$text_output = htmlentities($text, ENT_QUOTES);
$result = mysql_query("SELECT * FROM users WHERE id=$userid");
$myrow = mysql_fetch_array($result);
$user = $myrow["username"];
$query = "SELECT count(*) FROM threads WHERE userid = $userid";
$result = mysql_query($query);
$query_data = mysql_fetch_row($result);
$postcount = $query_data[0];
echo nl2br("
<tr>
<td width=\"18%\" valign=\"top\" bgcolor=\"#E5E5E5\"><font face=verdana size=2><b>$user</b><br><br>Posts: $postcount</b></td>
<td width=\"2%\" valign=\"top\" bgcolor=\"#FFFFFF\"> </td>
<td width=\"80%\" valign=\"top\" bgcolor=\"#E5E5E5\"><font face=verdana size=2>$text_output</td>
</tr>
<tr>
<td width=\"18%\" valign=\"top\"><font face=verdana size=1> </td>
<td width=\"2%\" valign=\"top\"><font face=verdana size=1> </td>
<td width=\"80%\" valign=\"top\"><font face=verdana size=1> </td>
</tr>
");
?>
<?php endwhile; ?>
</table>
<br><center><?=$rs->getPageNav("id=$id");
?>