Scusa .... l'ho visto solo ora... prova a togliere anche quel mysql_close($link);