<?php

$hostname = "localhost";
$user = "root";
$password = "xxxx";

if ( !$res_dbcon = mysql_connect( $hostname, $user, $password) ) {
print "DBConnectionError";exit;
)

$res_dblist = mysql_list_dbs ( $res_dbcon ) ;
while ( $db_name = mysql_fetch_row ( $res_dblist )) {
print "($db_name[0] }<BR>\n";
)

mysql_close ( $res_dbcon );

?>


実践マスターPHP+MySQL―PHP4/PHP5対応/小島 まさご
¥2,604
Amazon.co.jp