View Single Post
  #2 (permalink)  
Old 06-01-04, 10:12 AM
Guitarist49862 Guitarist49862 is offline
Newbie Coder
 
Join Date: Jun 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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>
Reply With Quote