From c43d6db0493d0b56842fef8683ad3c508989b212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 22 Jan 2010 15:40:19 +0000 Subject: [PATCH] Make tbl_create.php fail if database does not exist. --- tbl_create.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tbl_create.php b/tbl_create.php index 0390c03c0..397ba21e7 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -77,7 +77,10 @@ if (isset($_REQUEST['submit_num_fields'])) { /** * Selects the database to work with */ -PMA_DBI_select_db($db); +if (!PMA_DBI_select_db($db)) { + PMA_mysqlDie(sprintf($GLOBALS['strDatabaseNotExisting'], htmlspecialchars($db)), + '', '', 'main.php'); +} /** * The form used to define the structure of the table has been submitted