2.2.4
[phpmyadmin/arisferyanto.git] / db_create.php3
blob65da06495ccb428ff44f95834a54222ea1a7bcab
1 <?php
2 /* $Id$ */
5 /**
6 * Gets some core libraries
7 */
8 require('./libraries/grab_globals.lib.php3');
9 $js_to_run = 'functions.js';
10 require('./header.inc.php3');
13 /**
14 * Defines the url to return to in case of error in a sql statement
16 $err_url = 'main.php3'
17 . '?lang=' . $lang
18 . '&amp;server=' . $server;
21 /**
22 * Ensures the db name is valid
24 if (get_magic_quotes_gpc()) {
25 $db = stripslashes($db);
27 if (PMA_MYSQL_INT_VERSION < 32306) {
28 PMA_checkReservedWords($db, $err_url);
32 /**
33 * Executes the db creation sql query
35 $local_query = 'CREATE DATABASE ' . PMA_backquote($db);
36 $result = mysql_query('CREATE DATABASE ' . PMA_backquote($db)) or PMA_mysqlDie('', $local_query, FALSE, $err_url);
39 /**
40 * Displays the result and moves back to the calling page
42 $message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated;
43 require('./db_details.php3');