$connection = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."
");
mysql_select_db($dbname);
$sql = "select * from links";
$query = mysql_query($sql);
if (mysql_num_rows($query)) {
//moved the table header up here, out of the loop so that it only executes once
//everything else below will all be part of the same table
print '
URL | Description |
---|---|
'; print $url; print ' | '; print ''; print $description; print ' | '; print '