1. Get is used to obtain data from the server, while Post is used to transmit data to the server. 2. Get adds the data in the form to UR pointed to by action in the form of variablevalue
1. Get is used to obtain data from the server, while Post is used to transmit data to the server.
2. Get adds the data in the form to the URL pointed to by action in the form of variable = value, and the two use "?" And each variable is connected by "&". Post puts the data in the form data body and passes the data to the URL indicated by the action according to the corresponding variables and values.
3. Get is insecure because data is stored in the request URL during transmission, however, many existing servers, proxy servers, or user proxies record the request URL to a log file and place it somewhere, so that some private information may be seen by third parties, in addition, you can directly view the submitted data in the browser. some internal messages are displayed in front of the user. all Post operations are invisible to the user.
4. Get transmission has a small amount of data, mainly because it is restricted by the URL length, while Post can transmit a large amount of data, so only Post can be used for uploading files.
5. Get restricts that the dataset value of Form forms must be ASCII characters, while Post supports the entire iso000046 character set.
6. Get is the default Form method.
7. the post request can only be applicable to transfer requests between pages. directly enter the address from the address bar. The post request cannot be sent. in the case of post, the previous pageThe domain is passed as a parameter to the server. in the case of get, the parameter depends on "?" in the address. The following string constitutes a parameter, and the address specified by the src attribute in the frame is exactly the same as the address entered in the address bar, and the request is a get request.
In short, URLs are generally transmitted in get mode. for example, if you enter
Xxx. php? A = 1 & B = 2, then $ _ GET ['A'] $ _ GET ['B]
If you submit the form, and the form specifies method = post, for example
-
-
-
In this case, $ _ POST ['A'] is submitted. of course, if you specify his method = get, The GET method is submitted.
GET and POST are two methods for data transmission. the disadvantage of the GET method is that there is a limit on the length of bytes. Therefore, the form usually uses the POST method.