Where to get information about array fields in $_REQUEST?

This is mostly pure PHP, but it does have WordPress twist.

PHP has number of superglobal variables, that contain information relevant to current request. Out of those:

  • $_GET contains info from URL (HTTP GET request)
  • $_POST info from form submission (HTTP POST request)
  • $_COOKIES about cookies set
  • and $_REQUEST is combination of the above (according to docs $_COOKIES can be commonly configured to skip for better security)

However WP enforces its own logic – during load process wp_magic_quotes() processes variables to emulate magic quotes setting and enforces $_REQUEST to contain combination of $_GET and $_POST, no matter what PHP configuration says.

So in WordPress environment it will contain GET and/or POST request data. What data exactly that is will depend entirely which page you are on and what is happening on it.

Leave a Comment