This Should Work...
<?php
$host = "localhost";
$usr = "your_username";
$pw = "your_password";
?>
<select name="database" size="1">
Please select the database...
<?php
$conn = mysql_connect($host, $usr, $pw);
$result = mysql_list_dbs($conn);
while($row = mysql_fetch_object( $result )) {
print "<option>".$row[database]."</option>";
}
?>
</select>