If I understand your posting corrrectly, you want to read some data from a mysql table and display the returned data into a html table.
If this is correct, there are many different ways that you can do this. Here's one suggestion:
1. Using a standard query to the database table, pull your data.
2. While reading the returned records from the table, write the returned data to an array.
3. Close your mysql connection
4. Within your html, read the contents of the previous array into specific columns of your html table.
I'm attaching a snippet of some of my code from a script (note- I'm a fan of numerically indexed arrays)
$sq1="select fprog, fdesc from troster order by fprog";
$res1=mysql_query($sq1);
$ret1=mysql_num_rows($res1);
if($ret1>0)
{
$n=0;
while($r1=mysql_fetch_array($res1))
{
$aa[$n][0]=$r1['fprog']; #assigning field fprog to array aa[n][0]
$aa[$n][1]=$r1['fdesc']; #assigning field fdesc to array aa[n][1]
$n++;
}
}
mysql_close
_____
within your html you would read the contents of the array and display in the column associated with the specific field of the array like:
for($k=0; $k<(count($aa)); $k++)
{
print '<tr>';
print '<td>'.$aa[$k][0].'</td>'.'<td>.$aa[$k][1].'</td></tr>'."\n";
}
Hope this helps.
IndyTim