Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Listing des Bases de données


{filelink=12772}

<html>
<head>
<title>Base de données</title>
</head>
<body>

<?php

$connexion = mysql_connect("localhost", "root", "")
or die(mysql_error());

$dbs = mysql_list_dbs($connexion)or die(mysql_error());
$liste_BD ="<ul>";
$i =0;

while ($i < mysql_num_rows($dbs))
{
     $nom_BD[$i] = mysql_tablename($dbs,$i);
     $liste_BD .= "<li>$nom_BD[$i]";
     $i++;
}
$liste_BD .="</ul>";

echo "<P><strong>Les Bases de données de localhost</strong>:</P>".
   $liste_BD;
?>
</body>
</html>

No comments yet.

Leave a Comment