update
[phpmyadmin/crack.git] / db_create.php3
blob82fd5132f003697b7507989302b86e7ad0cd9d44
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Gets some core libraries
8 */
9 require('./libraries/grab_globals.lib.php3');
10 $js_to_run = 'functions.js';
11 require('./header.inc.php3');
14 /**
15 * Defines the url to return to in case of error in a sql statement
17 $err_url = 'main.php3'
18 . '?lang=' . $lang
19 . '&amp;convcharset=' . $convcharset
20 . '&amp;server=' . $server;
23 /**
24 * Ensures the db name is valid
26 if (PMA_MYSQL_INT_VERSION < 32306) {
27 PMA_checkReservedWords($db, $err_url);
31 /**
32 * Executes the db creation sql query
34 $local_query = 'CREATE DATABASE ' . PMA_backquote($db);
35 $result = PMA_mysql_query('CREATE DATABASE ' . PMA_backquote($db)) or PMA_mysqlDie('', $local_query, FALSE, $err_url);
38 /**
39 * Displays the result and moves back to the calling page
41 $message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated;
42 require('./db_details.php3');