php get refers to the "$_GET" variable, which is an array whose content is the variable name and value sent by the HTTP GET method. Its function is to collect data from the form of "method="get"" Value, its syntax is like "method="get"".
Recommended: "PHP Tutorial"
$_GET Variable
## The #$_GET variable is used to collect values from the form with method="get". Intuitively, it is the parameters that can be seen in the browser. For example, when I search for "wordpress" on Baidu, the URL I request is http: //www.baidu.com/s?ie=utf-8&bs=wordpress&f=8&rsv_bp=1&wd=wordpress&inputT=0, then the parameters after '?' can be obtained with $_GET, and each parameter is separated by '&' Matching. $_GET variable is an array containing variable names and values sent by the HTTP GET method. The information sent from the form with the GET method is visible to anyone (will be displayed in the browser's address bar), and there is a limit on the amount of information sent (up to 100 characters), Therefore, the length of the parameters is not infinite, but it can basically meet our requirements. Example<form action="hello.php" method="get"> Name: <input type="text" name="name" /> Age: <input type="text" name="age" /> <input type="submit" /> </form>
http://www.w3school.com.cn/welcome.php?name=Peter&age=37
Welcome <?php echo $_GET["name"]; ?>.<br /> You are <?php echo $_GET["age"]; ?> years old!
Welcome Mike You are 23 years old!
The above is the detailed content of What is the usage of php get. For more information, please follow other related articles on the PHP Chinese website!