Summary of the differences and connections between $_REQUEST, $_POST, and $_GET in PHP_PHP Tutorial

WBOY
Release: 2016-07-21 15:23:14
Original
927 people have browsed it

1. $_REQUEST

$_REQUEST in php can obtain data submitted by POST method and GET method, but the speed is relatively slow

2. $_GET

is used to obtain data submitted by the browser through the GET method. The GET method adds parameter data to the URL pointed to by the action attribute of the submitted form. The value corresponds to each field in the form and can be seen in the URL. However, it has the following shortcomings:

1. The security is not good and can be seen in the URL

2. The amount of data transmitted is small and cannot be larger than 2KB.

3. $_POST

is used to obtain the data submitted by the browser through the POST method. The POST method uses the HTTP POST mechanism to place each field of the form in the HTTP HEADER and transmit it to the URL address pointed to by the action attribute. The user cannot see this process. The size of his submission is generally unrestricted, but it varies slightly depending on the server. Compared with the _GET method, it is slightly more secure

4. The differences and connections between $_REQUEST, $_POST and $_GET

$_REQUEST["parameter"] is useful $_POST["Parameter"] has the same function as $_GET["Parameter"], but $_REQUEST["Parameter"] is slower. All data submitted through the post and get methods can be obtained through the $_REQUEST array ["parameters"]

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324541.htmlTechArticle1. $_REQUEST $_REQUEST in php can obtain data submitted by POST method and GET method, but the speed is relatively slow 2. $_GET is used to obtain data submitted by the browser through the GET method. GET method he...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template