phpMyAdmin prevent popup window for query editingPosted in PHP -
phpMyAdmin by default opens a popup window when you click the "Edit" link underneath a query. I personally prefer to not have a popup window open and this post looks at how to change the default behaviour.
What is phpMyAdmin?
phpMyAdmin is a PHP tool for administrating MySQL databases in a web browser. You can find out more information at the phpMyAdmin website.
Editing queries in a popup window
After running a query in phpMyAdmin, the sql query is displayed and directly underneath are links to edit the query and other options. This is shown in the screenshot below. The "Edit" link with the red circle around it is what you would click to edit the query displayed.
This works nicely in Firefox and Internet Explorer, but in Konqueror it opens it in another tab in the same popup window which makes it a bit useless, and in Opera it opens a new tab instead of sending the query back to the original tab which also a bit annoying.
Stop phpMyAdmin editing queries in a popup window
To prevent phpMyAdmin opening a popup window to edit queries after clicking the "Edit" link, you need to open up and edit the config.inc.php file. This is the root folder for phpMyAdmin. The current releases do not have one of these files by default and you would normally copy config.sample.inc.php as config.inc.php and edit that. (You would have needed to create a config.inc.php file when you installed phpMyAdmin to get it to work anyway).
All you need to do is add the following line anywhere in the file within the opening and closing PHP tags:
$cfg['EditInWindow'] = false;
After making this change, when you click the "Edit" link it will open it in the same window instead of opening up a popup window.