I have the code below which i use to return all the information from my database, however on one section of my site i want the information to display differently as show in the semantic below. The alignment has messed up a bit. I would like each result to be displayed in its own table. It will have to iterate the loop to display al the data. I change it to how i think it should be however it messes up on me! Anyhelp would be greatly appreciated.
[B]History Name[/B]
The history description should be displayed here
The abov is how it shoudl appear and below is the code
<TD VALIGN=TOP>
<?php
function displayHistory($History)
{
echo "<H1 ALIGN=center> History </H1>";
echo "<TABLE border=1 CELLPADDING=5 ALIGN = center>";
while ($row = mysql_fetch_row($History))
{
echo "<TR>";
foreach($row as $HistoryData)
echo "<TD> $HistoryData </TD>";
echo "</TR>";
}
echo "</TABLE>";
}
$domain = "";
$username = "";
$password = "";
$database = "";
$connection = mysql_connect($domain, $username, $password);
$database = mysql_select_db($database, $connection);
$History = mysql_query("SELECT HistoryName, HistoryDescription
FROM history", $connection);
displayHistory($History);
mysql_close($connection);
?>
</TD>