title: How to determine which database is selected
body: <p>After calling <code>mysql_select_db</code> to grab a database, is there any way to later output the name of the database that is currently selected? This seems very basic but I couldn't find anything on php.net or stackoverflow (all results are for "no database selected").</p>