PHP $_GET Variable
In PHP, the predefined $_GET variable is used to collect values from a form with method="get".
$_GET Variable
The predefined $_GET variable is used to collect values from a form with method="get".
Information sent from a form with the GET method is visible to everyone (it is displayed in the browser's address bar), and there is also a limit on the amount of information that can be sent.
Example
The form.html file code is as follows:
Runoob Tutorial(runoob.com)
When the user clicks the "Submit" button, the URL sent to the server is as follows:
http://www.runoob.com/welcome.php?fname=Runoob&age=3
The "welcome.php" file can now collect form data via the $_GET variable (note that the form field names automatically become keys in the $_GET array):
欢迎 !
你的年龄是 岁。
The form execution demo above:

When to use method="get"?
When using method="get" in an HTML form, all variable names and values are displayed in the URL.
**Note:** Therefore, this method should not be used when sending passwords or other sensitive information!
However, precisely because the variables are displayed in the URL, the page can be bookmarked. In some cases, this is very useful.
**Note:** The HTTP GET method is not suitable for large variable values. Its value cannot exceed 2000 characters.