PHP Tutorial $_get to get the data of the form that must be method=get, otherwise it will not be able to get the value Oh,
The $_get variable is an array of variable names and values that are sent by the HTTP GET method.
The $_get variable is 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 (up to 100 characters) to the amount of messages sent.
See an instance of getting form data
Properly determining which submission button is clicked in PHP:
if (Isset ($_get[' submit_one_x ')) {
} elseif (Isset ($_get[' submit_two_x ')) {
} else {
}
?>
Example Two
if ($_get[' time ']+300 >= time ()) {
echo "You took too long!
";
Exit
}
?>
Operation Select Value
ABCD
The PHP code to access which value (s) were selected:
foreach ($_get[' Myselect ') as $val) {
echo "You selected: $val
";
}
echo "You selected". Count ($_get[' Myselect ']). " Values. ";
?>
Get the data re-output of the form submission, which is also a complete example
A Simple HTML Form
index.php
Print "Welcome ". $_get [' User ']. "
nn ";
Print "Your address is:
" . $_get [' Address ']. "";
?>
Note: When using the $_get variable, all variable names and values are displayed in the URL. Therefore, this method should not be used when sending passwords or other sensitive information. However, because the variable is displayed in the URL, you can bookmark the page in the Favorites folder. In some cases, this is useful.
Note: The HTTP GET method is not suitable for large variable values; The value is not more than 100 characters
http://www.bkjia.com/PHPjc/631338.html www.bkjia.com true http://www.bkjia.com/PHPjc/631338.html techarticle PHP Tutorial $_get to get the data of the form that must be method=get, otherwise it will not be able to get the value Oh, the $_get variable is an array, the content is a variable sent by the HTTP GET method ...