$_REQUEST
Posted: Wed Aug 08, 2007 3:43 pm
So I've just been innocently using $_POST and $_GET when I needed to. POST for forms, GET for URLs. Peachy.
So then all of a sudden, one of my scripts doesn't work. ONLY ONE, though. And I used a $_GET in it. This is the only script that does this.
I change it to REQUEST, bang. Works perfectly.
So I go to look it up in W3, and I get this:
"The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE.
The PHP $_REQUEST variable can be used to get the result from form data sent with both the GET and POST methods."
But what's odd is, there's no down sides. I look at the PHP manual, can't find a down side. (it was also a tad opaque)
So my question - are there any down sides, or should I change every post and get I have, to request?
Edit: Thanks, guys.
So then all of a sudden, one of my scripts doesn't work. ONLY ONE, though. And I used a $_GET in it. This is the only script that does this.
I change it to REQUEST, bang. Works perfectly.
So I go to look it up in W3, and I get this:
"The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE.
The PHP $_REQUEST variable can be used to get the result from form data sent with both the GET and POST methods."
But what's odd is, there's no down sides. I look at the PHP manual, can't find a down side. (it was also a tad opaque)
So my question - are there any down sides, or should I change every post and get I have, to request?
Edit: Thanks, guys.