$_get Variable
The predefined $_get variables are used to collect values from the form method= "GET".
Information sent from a form with a GET method is visible to anyone (displayed in the browser's address bar) and has a limit on the amount of information sent.
Let's take a visual look at the Fig diagram and see how this demo is implemented:
The first step:
Client.html (only one line of code):
<a href= "Server.php?name=iwanghang&age=18" >server</a>
Step Two:
server.php:
<?php var_dump ($_get);//Print Result: Array (2) {["Name"]=> string (9) "Iwanghang" ["Age"]=> string (2) "}"} echo "<br>"; echo $_get[' name ']. " <br> "; Print Result: Iwanghang echo $_get[' age ']. " <br> "; Printed results: 18
--------------------------------------------------------------------------------------------------------------
Form submission:
server.php:
<!--<a href= "server.php?name=iwanghang&age=18" >server</a>--><!--form form--><form action= "server.php" method= "get" > username:<input type= "text" name= "name" ><br> age:< Input type= "text" name= "age" ><br> <input type= "Submit" value= "Commit" ></form>
The above is the Android Programmer learning PHP Development (11)-Form submission-phpstorm content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!