In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what are the differences between the predefined array $_ post and $_ get in php". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what are the differences between the predefined array $_ post and $_ get in php.
Differences: 1. "$_ GET" is used to collect values from "method=" get ", while" $_ POST "is used to collect values from" method= "post"; 2. The contents of" $_ GET "will be displayed in URL, while" $_ POST "will not.
Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
PHP predefined variables ($_ GET and $_ POST)
$_ GET
The $_ GET variable is an array of variable names and values sent by the HTTP GET method.
The $_ GET variable is used to collect values from the form from method= "get". Information sent from a form with the GET method is visible to anyone (it appears in the browser's address bar), and there is a limit on the amount of information sent (up to 100 characters).
When you use the $_ GET variable, all variable names and values are displayed in URL. So you should not use this method when sending passwords or other sensitive information. However, because the variable is displayed in URL, you can favorite the page in your favorites. In some cases, this is very useful.
At the same time, the HTTP GET method is not suitable for large variable values; the value cannot exceed 100 characters.
$_ POST
The $_ POST variable is an array of variable names and values sent by the HTTP POST method.
The $_ POST variable is used to collect values from the form from method= "post". Information sent from a form with the POST method is invisible to anyone (it does not appear in the browser's address bar), and there is no limit to the amount of information sent.
Example:
Enter your name: Enter your age:
When the user clicks the submit button, URL does not contain any form data, which looks like this: http://www.yisu.com/welcome.php
The "welcome.php" file can now get the form data through the $_ POST variable (note that the name of the form field automatically becomes the ID key in the $_ POST array):
Welcome .You are years old!
Variables sent through HTTP POST do not appear to have no length limit in URL.
However, because the variables do not appear in the URL, the page cannot be bookmarked.
Thank you for your reading, the above is "what is the difference between the predefined array $_ post and $_ get in php?" after the study of this article, I believe you have a deeper understanding of the difference between the predefined array $_ post and $_ get in php, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.