#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    I know that with method=post, we can get clean address in the address bar which is only the file name was viewed, and the variables not viewed.

    I want to know what is the benefit of using method=get, and what other benefits of using method=post.

    Thank you for any reply.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    1
    Rep Power
    0
    With the method get the user can change the information that's send to the server, and put information in it that isn't good.

    With the method post the variables will be put in $HTTP_POST_VARS and the user can't change the variables in the address bar.

    The user can't change it, and can't mess around with it


    hope this is what u looked for
    anita
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Newark, DE, USA
    Posts
    39
    Rep Power
    15
    The difference is not as much functional as it is conceptutal. They're both intended to be used for different purposes.

    - GET implies the form is only requesting information like an html doc, an image, or maybe some information from a database.
    - POST implies the form processing may update information on the server

    Functional differences aren't too drastic:
    - GET passes form data along with the URL. Subsequently, a form's data passing ability is limited by a browsers limit on URL length. Re-requesting the URL will pass all the data to the server again.
    - POST passes form data along as input arguments to a script or program. This is not limited by the client, so much more data can be passed when using the POST method. Re-requesting the URL to which data was POST'd will not send form data to the server again, unless your browser caches that data, and prompts you to send it again (usually with a "Yes/No" dialogue box). This is just in case that data was used to alter, say, a database on the server. It's not wise to introduce redundant, or extraneous data into a database.

    Note that these functionl differences depend on the browser you use. Some [older] browsers have poor implementations of the POST method.

    ------------------
    ~Chris
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    So why still I see so many web pages using get method, when there's no drastic functional difference?

    I've ever change the variable in the URL in some web sites, and they give me an error page or even a page with not supposed to be input variable

    I've run some problems though with post method when I want to assign a page link with customisable variable (<a href=""$PHP_SELF?viewCat=$CatID blah blah ...> )

    Thanx for your reply anita and chris.
    Is there any more comment on this?
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    7
    Rep Power
    0
    One benefit of the GET method is that the user can bookmark the result page. This is good for a product page that is generated from a database. You want the customer to be able to come back to the page without having to fill out another search form. Or be able to send a link to a friend.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Silly, I never thought about it, although it supposed to be clear to me.

    Thx all

Similar Threads

  1. post preview with regex
    By Hall in forum PHP Development
    Replies: 0
    Last Post: February 11th, 2004, 04:51 AM
  2. Query help
    By phprock in forum MySQL Help
    Replies: 9
    Last Post: February 8th, 2004, 04:59 AM
  3. Replies: 8
    Last Post: February 8th, 2004, 12:04 AM
  4. OCing 2800+, won't post
    By BurnZ in forum CPUs
    Replies: 1
    Last Post: January 23rd, 2004, 09:18 AM
  5. array threw txt files and post in textarea
    By code one in forum HTML Programming
    Replies: 0
    Last Post: December 3rd, 2003, 12:07 PM

IMN logo majestic logo threadwatch logo seochat tools logo