Today I ate nothing to tell the story of a n years ago I learn PHP is to learn the use of global variables, the need to get started friends can refer to.
One, $_get is the data that gets the form method for get
Second, $_get get the data of url.php?i=12,
The above is the data we used to get the value using GET,
Example one, get the data of form
The code is as follows |
Copy Code |
|
get.php
If I fill in a www.hzhuti.com
The code is as follows |
Copy Code |
You are . |
The output is
The code is as follows |
Copy Code |
You are www.hzhuti.com |
So what does the URL look like when we click submit?
The code is as follows |
Copy Code |
Get.php?username=www.hzhuti.com |
In this form, that is, the second way to get the data, let's take a look at the
/a.php?value=my
a.php
The code is as follows |
Copy Code |
The value is .
|
The output is
The code is as follows |
Copy Code |
Value is the My |
This looks and form of method=get no difference, haha, well, the article is here.
Get also has a method, that is direct $_get so, what will be the form, see instance.
The code is as follows |
Copy Code |
Apple Orange Mango |
checkbox.php File Code
The code is as follows |
Copy Code |
"; foreach ($_get["fruit"] as $value) {echo $value, " "; }?> |
The output is
If you choose orange and mango
Note that $_get is not suitable for large data volume of the acquisition length value is not more than 100 characters.
Original station original tutorial reprint must indicate source: http://www.bKjia.c0m/phper/php.html
http://www.bkjia.com/PHPjc/629218.html www.bkjia.com true http://www.bkjia.com/PHPjc/629218.html techarticle today I ate nothing to tell the story of a n years ago I learn PHP is to learn the use of global variables, the need to get started friends can refer to. One, $_get is to get the table method for ...