GET and POST

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shelly

    GET and POST

    I have a question that is going to make me look stupid, but as I am new to
    html and php (2 months), I'll as it anyway.

    I have been using POST as the action and to get values that were input. I
    understand that GET could also be used as the action (not just to get stuff
    after the "?" which I understand).

    a. When should GEt be used and when should POST be used?
    b. What is the difference between the two?

    Thanks.

    Shelly


  • Andy Hassall

    #2
    Re: GET and POST

    On Fri, 29 Jul 2005 21:43:29 GMT, "Shelly" <sheldonlg.news @asap-consult.com>
    wrote:
    [color=blue]
    >I have a question that is going to make me look stupid, but as I am new to
    >html and php (2 months), I'll as it anyway.
    >
    >I have been using POST as the action and to get values that were input. I
    >understand that GET could also be used as the action (not just to get stuff
    >after the "?" which I understand).
    >
    >a. When should GEt be used and when should POST be used?
    >b. What is the difference between the two?[/color]

    Over to the standard which has a brief explanation:



    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • John Dunlop

      #3
      Re: GET and POST

      Shelly wrote:
      [color=blue]
      > a. When should GEt be used and when should POST be used?[/color]

      The choice between the two rests on the test of 'idempotency',
      in an ideal world. Our world isn't ideal, however, and there
      are other things to ask yourself. How much weight you attach
      to each consideration depends on the scenario. A good
      description of some things to take into account is


      [color=blue]
      > b. What is the difference between the two?[/color]

      With respect to the methods themselves, the HTTP draft answers
      that. How they relate to HTML forms is covered in the HTML
      spec. Tim and Andy gave the links.

      --
      Jock

      Comment

      Working...