As a shortcut, you can use $_REQUEST inside, which is the amalgam of the superglobals _GET, _POST, _COOKIE and _ENVIRONMENT. Exactyl, which is included in it, is managed by the installation of request_order .ini.
Alternatively, a completely reliable way to check which METHOD you are working with is $_SERVER['REQUEST_METHOD'] . This value is always set when processing an HTTP request and will be GET, POST, HEAD, etc. Unlike checking for the presence of a form field, it is completely reliable - the form field may not be submitted (is the box unchecked?). It may be renamed to HTML, but you will forget to change the script, etc.
As for your require() , unless you specify an absolute url ( http://... ), PHP will interpret its argument as a request for a local file and will not pass it through the HTTP layer. If you do not have a file named query.php?tblName... , it will be "file not found" and the require () request will not work.
source share