Cameron,
here is a simple script
hope it helps it is from my site www.limerickchessclub.com
what i normally do is have the database part in a differnt script and use the include statement .
here it is , comment if you want
<?
Please edit the password to reflect the one you created for your database
$host = "localhost";
$database = "yourdb";
$conn = @mysql_connect($host, $database, "password") or die ("Unable to connect to database.");
mysql_select_db($database) or die ("Unable to select database.");
echo "<title>Links</title><body bgcolor=\"#FFCC33\"><div align=\"center\">";
echo "<table width=\"100%\" border=\"0\" height=\"75\">";
echo "<tr><td bgcolor=\"#6699CC\" width=\"14%\" height=\"58\"> </td>";
echo "<td bgcolor=\"#FFCC33\" width=\"72%\" height=\"58\">";
echo "<div align=\"center\">";
echo "<p><font size=\"4\"><b>=====Links=====</b></font></p></div><ul>";
$query = "Select * from links ORDER BY lDesc ";
$query_result_handle = mysql_query ($query);
for ($count = 1; $row = mysql_fetch_array ($query_result_handle); ++$count)
{
$xr1 = $row[0];
$xr2 = $row[1];
echo "<li><b><div align=\"left\"><a href=\"";
echo $xr2;
echo "\">";
echo $xr1;
echo "</a></div></li>";
}
echo "</ul></td><td bgcolor=\"#6699CC\" width=\"14%\" height=\"58\">";
echo "<div align=\"center\">";
echo "<p> </p></div></td></tr></table></div>";
?>