Hi All,
I am in the middle of making a forum, but my tables keep doing this too me: http://www.guitarad.co.uk/forumtopic.php?id=1&cat=1 - you see all that white space?
I think it may be a problem in the while statement? HEre is the code (i've just put the relevant bits in lol):
<?php
$page=1;
include("includes/header.php");
include("includes/connectdb.php");
include("forumincludes/cattext.php");
$getreply=mysql_query("select * from forumreply where topicid=".$id." order by posted");
$gettopic=mysql_query("select * from forumtopic where id=".$id."");
$rowtopic=mysql_fetch_array($gettopic);
?>
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stylesheets/stylesheets.css" rel="stylesheet" type="text/css">
</head>
<body>
<div align="center">
<table width="700" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="maintable"> </td>
</tr>
<tr>
<td height="85" colspan="2" class="borderlr"><?php print " "; include("includes/title.php"); ?></td>
</tr>
<tr>
<td width="155" valign="top" bgcolor="#FFECEC" class="bordertlr"> <?php include("includes/navbar.php"); ?></td>
<td width="544" valign="top" class="bordertr" ><div align="center"></div>
<br> <table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="forum.php">Forum</a> / <a href='forumcats.php?cat=<?php echo($cat); ?>'><?php echo($cattext); ?></a> / <?php echo($rowtopic['topic']); ?></td>
</tr>
</table>
<table width="98%" border="0" cellpadding="5" cellspacing="0">
<?php
$topictext=stripslashes($rowtopic['text']);
print "<tr valign='top'>";
print "<td width='21%' class='tableback'>".$rowtopic['originator']."<br><br>";
print date("j M", $rowtopic['lastpost']);
print "<br><font size='2'>";
print date("G:i", $rowtopic['lastpost']);
print " GMT</font></td>";
print "<td width='79%' class='forumcolumn'>".$topictext."<br><br></td>";
print "</tr>";
print "<tr><td><img src='images/spacer.gif' width='1' height='4'></td></tr>";
while ($rowreply=mysql_fetch_array($getreply))
{
$replytext=stripslashes($rowreply['reply']);
print "<tr valign='top'>";
print "<td width='21%' class='tableback'>".$rowreply['username']."<br><br>";
print date("j M", $rowreply['posted']);
print "<br><font size='2'>";
print date("G:i", $rowreply['posted']);
print " GMT</font></td>";
print "<td width='79%' class='forumcolumn'>".$replytext."</td><br><br>";
print "</tr>";
print "<tr><td><img src='images/spacer.gif' width='1' height='4'></td></tr>";
}
?>
</table>