Please note this is NOT the best way of doing it, but its the way I'm using due to time restrictions at the moment, it should get you started... (this is a shortened version of one I use)
<?php
//connect to db
include ("../cgi-bin/connect.inc");
$query = mysql_query("SELECT * FROM table ORDER BY position DESC",$db);
if ($query) {}
else {
echo("<P>Error: " .
mysql_error() . "</P>");
}
?>
<?php
echo "<table align=center border=1>\n";
echo "<tr><td>Name</td><td>Email</td></tr>\n";
do
{
printf ("<tr><td>%s</td><td align=center>%s</td></tr>\n",
$myrow["name"], $myrow["showemail"],);
}
while
($myrow = mysql_fetch_array($query));
echo "</table>\n";
?>
%s is a C thing I believe, basically its the values from the table that you get from the query.
Hope it works.