I dunno, here is my logon script, you can try it this way.
<?php
define ('DB_USER', 'myUserName');
define ('DB_PASSWORD', 'myPass');
define ('DB_HOST', 'localhost');
define ('DB_NAME', 'my_db');
$dbc = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)
OR die ('error connecting');
@mysql_connect_db (DB_NAME) OR
die ('connect error' . mysql_error());
?>
i would also look at your mysql_close($link) command. you are closing your link to mysql there, but dont you want to pass your $conn to that? what is $link?
also, why are you closing the connection to mysql right after you connect? arent you going to want to put some queries in there before you close the connection?