PHP Tutorial: the difference between passing values through POST and GET. Q: I used the POST method in formactionsearch_result.phpmethodPOST, but why not use the GET method? First, let's take a look at the difference between POST and GET: When Post transmits data, don't ask: I used POST for the method, but why not use the GET method?
First, let's take a look at the difference between POST and GET values:
When Post is used to transmit data, it does not need to be displayed in the URL, but the Get method must be displayed in the URL. The size of Post data transmission can reach 2 MB, while the Get method can only transmit about 1024 bytes due to the limited URL length. In general, we use POST as the first choice, which is safer.
Differences between $ _ REQUEST, $ _ POST, and $ _ GET in PHP
All three methods are used to receive form data.
$ _ REQUEST uses the functions $ _ POST and $ _ GET, but $ _ REQUEST is slow. All data submitted through the POST and GET methods can be obtained through the $ _ REQUEST array.
Differences and features between $ _ POST and $ _ GET
1. GET is to GET data from the server, and POST is to send data to the server.
2. GET is to add the parameter data queue to the URL referred to by the ACTION attribute of the submission form. the values correspond to each field in the form one by one and can be seen in the URL. POST uses the http post mechanism to place fields in the form and their content in the html header and send them to the URL address referred to by the ACTION attribute. You cannot see this process.
3. for the GET method, the server uses Request. QueryString to obtain the value of the variable. for the POST method, the server uses Request. Form to obtain the submitted data.
4. the data volume transmitted by GET is small and cannot exceed 2 kB. The amount of data transmitted by POST is large, which is generally not restricted by default. Theoretically, the maximum size of IIS4 is 80 kB, and that of IIS5 is 100KB.
5. Low GET security and high POST security.
Using action = search_result.php method = post I used the POST method, but why not use the GET method? First, let's take a look at the difference between POST and GET: When Post transmits data, no...