Hmmm....
Why are you selecting field name from a database instead of a table?
first you connect - you did that
second - select your database <b>$db=mysql_select_db("$db_name", $conn);</b>
Once you did that you need to query it
$sql="Select name from $table_name(not $db_name)";
Also die is a function, I don't know if it'll matter, but write it like this - die("comments..");
Di