Unable to connect to the database server

"); exit(); } // Select the database if (! mysql_select_db($database)) { echo( "

Unable to locate links database

"); exit(); } //Build link category index $result = mysql_query( "SELECT links_category.category FROM links_category,links WHERE links_category.category = links.category GROUP BY category ORDER by category"); if ($result) { // display category index $index = "Index:"; $separator = " "; while ($row = mysql_fetch_array($result) ) { $index = trim($index) . $separator . "" . trim($row["category"]) . ""; $separator = " | "; } echo ""; echo ""; echo ""; //echo ""; } $count = 0; $last_category = null; $result = mysql_query( "SELECT * FROM links ORDER by category, seq"); if ($result) { // display links by category while ($row = mysql_fetch_array($result) ) { //generate category header if category changes if ( strtolower($last_category) <> strtolower($row["category"]) ) { echo ""; echo ""; echo ""; $last_category = $row["category"]; } //force absolute reference to site (in case http:// not entered in database) $url = (substr(strtolower($row["url"]),0,7) <> "http://") ? "http://" . trim($row["url"]) : trim($row["url"]); //show link echo ""; echo ""; echo ""; echo ""; echo ""; $count = $count + 1; } // if none found, say so if ($count == 0) { echo("No links found"); } } else { echo("

Error getting links:

" . mysql_error() . "

"); } ?>
"; echo "

" . $index . "

"; echo "
 
"; echo "" . $row["category"] . ""; echo "
"; echo (substr(strtolower($row["graphics"]),-4) == ".gif" or substr(strtolower($row["graphics"]),-4) == ".jpg" or substr(strtolower($row["graphics"]),-4) == ".bmp" or substr(strtolower($row["graphics"]),-4) == ".png") ? "" : "" . $row["graphics"] . ""; echo ""; echo $row["description"]; echo "