ERROR: Unable to connect!"); mysql_select_db($db) or die ("ERROR: Unable to select database!

You're setting for \$db in ezlink.php is incorrect."); $query = "SELECT * FROM $table WHERE id=$ID"; $result = mysql_query($query) or die("ERROR: " . mysql_error()); if (mysql_num_rows($result) == 1) { $queryudate = "UPDATE $table SET hits=hits + 1 WHERE id=$ID"; $resultudate = mysql_query($queryudate) or die ("Error in query: $queryudate. " . mysql_error()); while($row = mysql_fetch_object($result)) { header("Location: $row->url"); } } else { echo "ERROR: An invalid link id was specified!"; } } else { echo "ERROR: An invalid link id was specified!"; } } else { echo "ERROR: No link was specified!"; } ?>