<?
    $usr 
"--username--";
    
$pwd "--password--";
    
$db "linksdb";
    
$host "localhost";

    
# connect to database
    
$cid mysql_connect($host,$usr,$pwd);
    
mysql_select_db($db);
    if (
mysql_error()) { print "Database ERROR: " mysql_error(); }

?>
<html>
 <head>
  <title>Display Link</title>
 </head>
 <body bgcolor="#ffffff" >

<?
    $category 
"Local Docs";

    
# setup SQL statement
    
$sql  " SELECT * FROM links ";
    
$sql .= " WHERE category = '$category' ";

    
# execute SQL statement
    
$rs mysql_query($sql$cid);
    if (
mysql_error()) { print "Database Error: $sql " mysql_error(); }

    
# display results
    
print "<p><dt><b>$category</b><br>\n";
    while (
$row mysql_fetch_array($rs)) 
    {
        
$siteurl $row["siteurl"];
        
$sitename $row["sitename"];

        print 
"<dd><a href='$siteurl'>$sitename</a></dd>\n";
    }
    print 
"</dt></p>";

?>

</body>
</html>