Re: Re: $_GET, $_POST, $_COOKIE, $_FILES == $_REQUEST?
| From: | Chris Shiflett | Date: | Wed, 16 Oct 2002 03:35:22 +0000 |
| Subject: | Re: Re: $_GET, $_POST, $_COOKIE, $_FILES == $_REQUEST? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89541@lists.php.net to get a copy of this message | ||
Right. I was just wondering if there was a reason why the $_POST array wasn't originally created like Sterling suggested for $_FILES and $_REQUEST in his solution 1:
$_FILES['toto']['c']['type'] and $_REQUEST['toto']['c']['type']
Meaning, I'm not clear why $_FILES is necessary, since the same approach can be taken for files in the $_POST array, mixing them with other types just like $_REQUEST does (the suggested way above, anyway).
Also, solution 2 mentioned was this:
$_REQUEST['toto']['c']['type'] and $_FILES['toto']['type']['c'] which is ugly and just not right, but it maintains backwards compatibility with the $_FILES array.Is the thought here that no one will be depending on the weird format of the $_REQUEST array as mentioned in the bug report? If we're worried about BC, I don't see why we should favor one group of people (those using $_FILES) over another (those using $_REQUEST), unless I'm missing something ... Chris Rasmus Lerdorf wrote:
Because there is more data associated with a file upload than just a single piece. On Tue, 15 Oct 2002, Chris Shiflett wrote:Out of curiosity, why are files treated differently than all other form variables submitted via POST? We don't have $_TEXT, $_RADIO, etc. Maybe there is a good reason, but it seems counter-intuitive to me. Chris