Results 1 to 3 of 3

Thread: $_REQUEST overwrite order?

  1. #1
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default $_REQUEST overwrite order?

    Random thought, and not related to a particular situation, but I'm curious about how $_REQUEST is generated.

    It's a superglobal array composed of $_GET, POST, and COOKIE (plus $_FILES in PHP 4.1- or something).

    If you have a variable with the same name in two or more of the different bits, then, how does it work? Which is loaded first (then overwritten), and which is last (therefore there in the end)?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #2
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hi

    Found this:
    $_REQUEST

    Variables provided to the script via the GET, POST, and COOKIE input mechanisms, and which therefore cannot be trusted. The presence and order of variable inclusion in this array is defined according to the PHP variables_order configuration directive. This array has no direct analogue in versions of PHP prior to 4.1.0. See also import_request_variables().

    Caution

    Since PHP 4.3.0, FILE information from $_FILES does not exist in $_REQUEST.

    Note: When running on the command line , this will not include the argv and argc entries; these are present in the $_SERVER array.
    Very Best Rgds, Simonf :cool:
    __________________________________
    My Site | E-Mail Me

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Alright, thanks.

    I'm aware of the security issues, and I prefer using $_GET, etc. anyway, but I was just wondering about this.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •