mysql_create_db()
resource mysql_create_db(database[,connection])
Use this function to create a database in MySQL for the
current connection. The name of the database to create is given as the
first argument of the function. A different MySQL connection
identifier may be given as a second argument. The function returns
true if it’s successful, false if unsuccessful. This function is
deprecated; use the mysql_query() function with the
CREATE DATABASE statement instead. Still, here is
an example:
...
mysql_create_db('new_db');
$databases = mysql_list_dbs( );
while($db = mysql_fetch_row($databases)) {
print $db[0] . "\n";
}
...This script will create a new database and then display a list of databases to allow the user to confirm that it was successful.