diff --git a/tbl_move_copy.php b/tbl_move_copy.php
index 359051079..7885b7593 100644
--- a/tbl_move_copy.php
+++ b/tbl_move_copy.php
@@ -28,6 +28,14 @@ PMA_DBI_select_db($db);
$goto = $cfg['DefaultTabTable'];
+/**
+ * $_REQUEST['target_db'] could be empty in case we came from an input field
+ * (when there are many databases, no drop-down)
+ */
+if (empty($_REQUEST['target_db'])) {
+ $_REQUEST['target_db'] = $db;
+}
+
/**
* A target table name has been sent to this script -> do the work
*/
diff --git a/tbl_operations.php b/tbl_operations.php
index d3b30d9be..4db1075fc 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -211,7 +211,7 @@ unset($columns);
count() > $GLOBALS['cfg']['MaxDbList']) {
?>
-
+
@@ -370,7 +370,7 @@ if (isset($auto_increment) && strlen($auto_increment) > 0
count() > $GLOBALS['cfg']['MaxDbList']) {
?>
-
+