davidjmorin
January 22nd, 2008, 04:21 PM
i have the following script and need help with some of the table work
id like to have the cells when new ones are added they go horizontal until they reach 4 colomns then drop down a row. how would i accomplish taht?
<?php
include 'config.php';
include 'opendb.php';
$query = "SELECT name, date, Email, message FROM contact";
$result = mysql_query($query);
echo '<table border="5" BORDERCOLORLIGHT=YELLOW BORDERCOLORDARK=BLUE bgcolor="#6699ff" width="200px"><tr><td>';
while($row = mysql_fetch_assoc($result))
{
echo '<tr>';
echo '<td>';
echo "Date : {$row['date']} <br>" .
"Name :{$row['name']} <br>" .
"Email : {$row['Email']} <br>" .
"Message : {$row['message']} <br><br>";
echo '</tr>';
echo '</td>';
}
echo '</table>';
include 'closedb.php';
?>
<html>
<body bgcolor="black">
</html>
id like to have the cells when new ones are added they go horizontal until they reach 4 colomns then drop down a row. how would i accomplish taht?
<?php
include 'config.php';
include 'opendb.php';
$query = "SELECT name, date, Email, message FROM contact";
$result = mysql_query($query);
echo '<table border="5" BORDERCOLORLIGHT=YELLOW BORDERCOLORDARK=BLUE bgcolor="#6699ff" width="200px"><tr><td>';
while($row = mysql_fetch_assoc($result))
{
echo '<tr>';
echo '<td>';
echo "Date : {$row['date']} <br>" .
"Name :{$row['name']} <br>" .
"Email : {$row['Email']} <br>" .
"Message : {$row['message']} <br><br>";
echo '</tr>';
echo '</td>';
}
echo '</table>';
include 'closedb.php';
?>
<html>
<body bgcolor="black">
</html>