Listing the databases available in a connection
$user = "rntsoft";
$pass = "password";
$link = mysql_connect( "mysql153.secureserver.net", $user, $pass );
if ( ! $link )
die( "Couldn't connect to MySQL" );
$db_res = mysql_list_dbs( $link );
$num = mysql_num_rows( $db_res );
for( $x = 0; $x < $num; $x++ )
print mysql_tablename( $db_res, $x )."
";
mysql_close( $link );
?>