This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9120|Reply: 2

What is the difference between PHP's POST commit and GET commit?

[Copy link]
Posted on 11/19/2014 9:16:49 PM | | |
If I put this code:
[mw_shl_code=php,true]echo '<form id="payform" action="'.$requesturl.'" method="post"></form><script type="text/javascript" reload="1">$(\'payform\').submit(); </script>'; [/mw_shl_code]

Replace with:
[mw_shl_code=php,true]echo "<script type='text/javascript' reload='1'>window.location.href='$requesturl'; </script>"; [/mw_shl_code]

What is the impact on the program, and what is the difference between a post commit and a get commit?




Previous:The method of modifying WeChat ID unlimited times
Next:The list of school scholarships for the 2013-2014 academic year of the School of Computer Science is announced
Posted on 11/19/2014 9:21:40 PM |
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 pointed to by the ACTION attribute of the submitted form, and the values correspond to each field in the form, which can be seen in the URL. post is the HTTP post mechanism to place each field in the form and its content in the HTML HEADER to the URL address indicated by the ACTION attribute. Users don't see the process.
3. For the get method, the server side uses Request.QueryString to obtain the value of the variable, and for the post method, the server side uses Request.Form to obtain the submitted data.
4. The amount of data sent by get is small, and cannot be greater than 2KB. The amount of data transmitted by post is large, and it is generally defaulted to unlimited. But theoretically, the largest amount in IIS4 is 80KB, and in IIS5 it is 100KB.
5. Get security is very low, post security is high. But the execution efficiency is better than the Post method.

Recommendations:
1. The security of the get method is worse than that of the Post method, if it contains confidential information, it is recommended to use the Post data submission method;
2. When doing data query, it is recommended to use the Get method; When adding, modifying or deleting data, it is recommended to use the Post method;
Posted on 12/25/2014 5:45:43 PM |
I just watched it, this http://zh.wikipedia.org/wiki/REST
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com