--- a/adminer/select.inc.php
+++ b/adminer/select.inc.php
@@ -199,10 +199,11 @@
 
 $table_name = $adminer->tableName($table_status);
 if (is_ajax()) {
-	// needs to send headers
+	page_headers();
 	ob_start();
-}
-page_header(lang('Select') . ": $table_name", $error);
+} else {
+	page_header(lang('Select') . ": $table_name", $error);
+}
 
 $set = null;
 if (isset($rights["insert"])) {