Get and post differences in PHP

Source: Internet
Author: User

There are two ways to establish a connection on the client and server side.
One is get mode
The other is the Post method
So what's the difference between the two?

    1. Show a Difference
      The Get method is to stitch strings in the address bar to see
      And the Post method is invisible.

    2. The size of the pass is different
      The specific size and browser are related, ie browser is 2k other browser maximum value may be different, but also relatively small.
      The Post method passes the size of the parameter can be set, the original is considered infinitely large. In PHP, the php.ini file can be set to the size of the parameter.

    3. Security
      The Get method is less secure because the Post method is relatively safe to expose

    4. Principle of submission
      The data submitted by the Get method is independent.
      The Post method turns all committed data into a single whole (commits the data into XML format)

    5. Flexibility
      The Get method is flexible,
      Post method is not flexible, must have a form of participation in order to use post submission is inconvenient

post and get is not a claim, a commit. Both can be submitted and obtained. It's just that they're different from the server-side mechanism for requesting data

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.