Results 1 to 8 of 8

Thread: $_Get abilities

  1. #1
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default $_Get abilities

    I know that when you use get method with forms it puts into the url... but what else can it do and what is it usefull for?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    _GET isn't a method, it's a variable (as evidenced by the $ prefix) that stores an associative array. Nothing more.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    a good thing to note on this variable is that there is a character limit cap, which is why it is suggested to use $_POST when sending something to the server-side, where $_GET is recommended to be used soley for data retrieval.

  4. #4
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    So could I get data from a external file and analyze it? If thats not the command what would do that?

    Like and example
    The get command gets data from "data.txt"
    Then it does some magic thing where it analyzes it and check to see if that name already exists or entry already exists...
    Then based on the data it does something...

    Could $_Get do that?

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, of course not. _GET is named after the HTTP method GET, not its purpose. You probably want fread().
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    ok thanks!

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

    Default

    $_GET is the array of values sent in the url, as ../index.php?var1=val1&var2=val2&var3=val3&etc

    $_GET['var1'] is 'val1' in that case.

    It's used as a way of sending between pages, either with a method="GET" form or a URL (link, the action of a POST form, image src, etc.). Note that a method="GET" form is just a way of using a form to generate a URL, not really sending any "form data" as such.
    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

  8. #8
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    ok... thanks!

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
  •