Così a naso, $db_name è errato.

In ogni caso, studiati il manuale ufficiale:

http://www.php.net/mysql_error