PHP guestbook issues

astridca

New Member
Messages
13
Reaction score
0
Points
0
I am working with a guestbook script (ardguest) and I want each message to appear in an individual table, but they all appear together in one table. To see what I am talking about, you can view the gbook here: http://madpwnage.x10hosting.com/gbookie. I'm kind of a n00b to PHP and so far I have been unsuccessful in figuring out how to do this.

Here is the code for the entries and the table as of now:

<table width="400" cellpadding="0" cellspacing="1" border="0">
<tr bgcolor="<?=$table_border?>">
<td>
<table width="100%" cellpadding="4" cellspacing="1" border="0">

<?

$w = 0; //--Color
for ($i=0; $i<$max_entry_per_page; $i++) {
$nomrec++;
$no++;
//$no--;
$recno = $nomrec-1;
if (isset($record[$recno])) {
$row = explode("|~|",$record[$recno]);
if ($w==0) {
$warna = $table_content_1a;
$warna2 = $table_content_1b;
$w=1;
} else {
$warna = $table_content_2a;
$warna2 = $table_content_2b;
$w=0;
}
echo "<tr>
<td bgcolor=\"$warna2\" align=\"center\" valign=\"top\" width=\"15\">
<font size=\"2\">$no</font>
</td>
<td bgcolor=\"$warna\" width=\"570\">
<table border=\"0\" width=\"100%\">
<tr>
<td>
<font size=\"1\">$row[2]</font><br>
<b>$row[3]</b> &middot; <a href=\"mailto:$row[4]\">@</a> &middot; <a href=\"$row[6]\" target=\"_blank\">http</a>
</td>
";
echo "<td align=\"right\" valign=\"top\">";




if (trim($row[6]) != "" && trim($row[6]) != "http://") {
if (ereg("^http://", trim($row[6]))) echo " <td valign=\"top\" bgcolor=\"$warna2\" align=\"center\" width=\"15\">
<a href=\"$self?do=del&id=$row[1]&page=$page\">x</a>";
else echo " <a href=\"http://$row[6]\" target=\"_blank\"><img src=\"imgs/homepage.gif\" border=\"0\" alt=\"$row[6]\"></a>";
}



echo '</td></tr></table>';
echo "<table border=\"0\" width=\"100%\">
<tr><td width=\"5\">&nbsp;</td><td>
<font face=\"$message_font_face\" size=\"$message_font_size\">".stripslashes($row[5])."</font>
</td></tr>
</table>
";

} //--end if
} //--end for

echo "<tr><td colspan=\"3\" bgcolor=\"$table_bottom\" align=\"center\" width=\"600\"> <font size=\"2\">";

?>

</table>
</td>
</tr>
</table>



Thanks!
 
Top