A bit of a beginner example which shows how to list all of your MySQL databases
$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 . "
";
}
?>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment