Don't see anything in your answer which is to be unsetted, though you can use $_REQUEST['foo']
, as that will consider $_POST
as well as $_GET
but again, your code will be dirty, say for example I tweaked the method
value, for login form, users can easily attack your website...
So be wise, use $_GET[]
and $_POST[]
instead of using loose $_REQUEST[]
If for any means, you are using $_REQUEST
thank make sure you use conditions to check whether the request is GET
or POST
using $_SERVER['REQUEST_METHOD']
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
//Do something
}