list all databases

list all your MySql databases

<?php
$server = "localhost";
$username = "root";
$password = "";
$con = mysql_connect("$server","$username","$password")or die ("Couldn't connect to MySQL Server.");

$listdb = mysql_list_dbs($con);
while ($row = mysql_fetch_object($listdb))
{
echo $row->Database . "<br>";
}
?>