id 1 in php means PHP GET method to pass the value, the complete statement is such as "mypage?id=1", get is to add the parameter data queue to the URL pointed to by the ACTION attribute of the submitted form, the value and the form Each field corresponds one to one and can be seen in the URL.
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer
What does id 1 in php mean?
There are $_request, $_post, and $_get in PHP for accepting form data. What are the differences between them and when is the best time to use them?
1. The differences and characteristics of $_request, $_post, and $_get $_REQUEST[] has the functions of $_POST[] $_GET[], but $_REQUEST[] is slower. All data submitted through the post and get methods can be obtained through the $_REQUEST array
2. The differences and characteristics of $_post and $_get
1. Get is to obtain data from the server, post is to transfer data to the server.
2. Get adds the parameter data queue 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. Post uses the HTTP post mechanism to place each field in the form and its content in the HTML HEADER and transmit it to the URL address pointed to by the ACTION attribute. Users 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 amount of data transmitted by get is small and cannot be larger than 2KB. The amount of data transmitted by post is relatively large and is generally unrestricted by default. But in theory, the maximum amount is 80KB in IIS4 and 100KB in IIS5.
5. The security of get is very low, and the security of post is high.
Example: mypage?id=1
This is the GET method to pass the value, you can use $_request and $_get to accept the value.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What does id 1 mean in php. For more information, please follow other related articles on the PHP Chinese website!