In both cases, there may be data ... Consider the following (very simple) page:
<body> <form method="post" action="params.php?myparam=myval"> <input type="text" name="param1"></input> <input type="submit" name="submit" value="submit" /> </form> </body>
Note that the action form contains the query string, and the method contains post . $_GET contains the query string parameters, $_POST contains the form parameters, and $_REQUEST contains the combined parameters from both arrays:
array(3) { ["myparam"]=> string(1) "myval" ["param1"]=> string(0) "" ["submit"]=> string(6) "submit" }
Check request_order to control the processing of super-global in $_REQUEST .
jheddings
source share