The $_REQUEST
is the generic type of $_GET, $_POST,$_COOKIE
for it both if your data is coming via $ _GET or $ _POST it rescues both, its use is little recommended.
Why is your usage not recommended?
The biggest reason is security, suppose you have a form on the pagina1.php
page that will be sent to pagina2.php
.
If you use $ _ REQUEST data can be passed directly through querys string, then your application will be subject to attacks.
See the note in the PHP manual:
Variables in $ _REQUEST are provided for the script via GET, POST, and COOKIE input mechanisms and could be
modified by a remote user and can not be trusted. THE
the presence and order of the variables listed in this array is defined
according to the PHP configuration directive variables_order.
So, if it does not matter if your data is sent via get or post, use $_REQUEST
otherwise forget it.
References: $ _GET, $ _POST, $ _REQUEST where, when and how