PDA

View Full Version : tables erros


runnerjp
05-31-2008, 02:28 PM
i didnt know if i should post this on css or php but here goes...

for some reaosn with this code my table is not right unless there is also a reply in the table then it fits within the area..... so for some reason if this <?
if ($pagenum == 1){
?>
<tr class='mainrow'><td valign='top'><? echo $gettopic3['author'] ?> </td>
<td vakign='top'>created on <? echo $gettopic3['showtime']?><br>
<hr>
<p>
<?

$message = $gettopic3['post'];

$message=nl2br($message); ?>

<? echo $message ?></p>
<p><br>

</p></td></tr> is on it own the table streches right as far as it can knocking all the things on the right below the table... is it due to my posititoning of php within the table

here is the full code (does that make sence)

<table class='maintable'>

<tr class='headline'><td width=20%>Author</td><td width=80%>Post</td></tr> <?
if ($pagenum == 1){
?>
<tr class='mainrow'><td valign='top'><? echo $gettopic3['author'] ?> </td>
<td vakign='top'>created on <? echo $gettopic3['showtime']?><br>
<hr>
<p>
<?

$message = $gettopic3['post'];

$message=nl2br($message); ?>

<? echo $message ?></p>
<p><br>

</p></td></tr>
<?php
}

$getreplies="Select * from forumtutorial_posts where parentid='$id' $max"; //getting replies

$getreplies2=mysql_query($getreplies) or die(mysql_error()."Could not get replies");

while($getreplies3=mysql_fetch_array($getreplies2))

{

?><tr class='mainrow'><td valign='top'><? echo $getreplies3['author']?> </td><td vakign='top'>replied at <? echo $getreplies3['showtime']?> <br>
<hr>
<p>
<?

$message=$getreplies3['post'];

$message=nl2br($message);

?>
<? echo $message?></p>
<p><br>

</p></td></tr>

</table>

Apostropartheid
05-31-2008, 02:49 PM
It would be easier if you copy & pasted actual parsed code.

runnerjp
05-31-2008, 02:58 PM
what do you mean??

runnerjp
05-31-2008, 03:11 PM
i thought i would show you images on whats going wrong so

the correct way to show it

http://www.runningprofiles.com/images/no1.jpg

and then there is what happens when only the thread is in my db and nothing else

http://www.runningprofiles.com/images/no2.jpg