The $_GET superglobal is defined as part of the URL string:

http://example.org/index.php?foo=bar&baz=1

In index.php:

echo $_GET['foo']; // bar
echo $_GET['baz']; // 1

So $_GET is not stored on the server, but is passed with each HTTP request, as is $_POST, but that is passed in the HTTP headers rather than simply appened to the end of the URL.

Answer from kingcoyote on Stack Overflow
๐ŸŒ
PHP
php.net โ€บ manual โ€บ en โ€บ reserved.variables.get.php
PHP: $_GET - Manual
The above example will output something similar to: Hello Hannes! ... This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. There is no need to do global $variable; to access it within functions or methods. ... The values in $_GET are automatically passed through urldecode().
๐ŸŒ
W3Schools
w3schools.com โ€บ php โ€บ php_superglobals_get.asp
PHP $_GET Superglobal
The $_GET superglobal contains an array of variables received via the HTTP GET method.
๐ŸŒ
EDUCBA
educba.com โ€บ home โ€บ software development โ€บ software development tutorials โ€บ php tutorial โ€บ php get method
PHP GET Method | How PHP GET Method Works? (Examples)
April 10, 2023 - The data can be accessed with the help of the QUERY_STRING environment variable which is sent by the GET METHOD concept. To access the sent data/info $_GET is used most of all the time. ... This is the example of using the GET METHOD of the ...
Address: Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
๐ŸŒ
Pi My Life Up
pimylifeup.com โ€บ home โ€บ how to use php $_get global variable
How to use PHP $_GET Global Variable - Pi My Life Up
August 4, 2022 - We named our script get.php and stored it on an accessible local development server. Our query string has bg=beige where name is bg and value is beige. You can access the value by using the name in our GET variable, for example, $_GET['bg'].
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ php โ€บ php_get_post.htm
PHP - GET & POST
PHP provides the following three superglobals to retrieve and process the request parameters โˆ’ ยท $_GET โˆ’ an associative array to access all the sent information using GET method.
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ php-get
PHP $_GET
August 28, 2020 - The difference between $_GET and $_POST is that the former uses URL parameters to pass form data, while the latter uses the HTTP POST method. Suppose a user visits the URL: http://example.com/?name=John&age=25.
Find elsewhere
๐ŸŒ
CodeWithHarry
codewithharry.com โ€บ tutorial โ€บ php-get
$_GET | PHP Tutorial | CodeWithHarry
We can access the values in name_get.php with the $_GET superglobal.
๐ŸŒ
Oregoom
oregoom.com โ€บ home โ€บ $_get in php
โ–ท How to use $_GET in PHP โ†’ ใ€ PHP Tutorial ใ€‘
October 30, 2024 - In this code, the action attribute of the form points to the file โ€œresultados.phpโ€, which will be responsible for processing and displaying the search results. The method attribute is set to โ€œgetโ€ to use the $_GET superglobal in PHP. Next, we will create the file โ€œresultados.phpโ€ that will process the search query and display the results. In this example, we will simulate a search in an array of data.
๐ŸŒ
W3Schools
w3schools.in โ€บ php โ€บ get-post
PHP GET and POST - W3schools
$_GET and $_POST are Superglobal variables in PHP which used to collect data from HTML form and URL. This chapter shows how to collect submitted form-data from users by using POST and GET method. The example below contains an HTML form with two input fields, and a submit button:
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ php โ€บ get-and-post-in-php
$_GET and $_POST in PHP - GeeksforGeeks
July 23, 2025 - The form includes a text input field for the username. The submit button sends the form data when clicked. After submission, PHP retrieves and displays the entered username using $_GET['username'].
Top answer
1 of 2
9
Hi Kristian, You're definitely on the right track but just to clarify a few things: I'm trying to wrap my head around this $_GET function $_GET is not a function, it's an associative array. 1) If you add a question mark at the end of a URL e.g. "?category=books" - the word after the question mark - "category", becomes a variable and the word "books", becomes its value Yes. 2) The function takes a string variable name - $_GET["category"] Looping back to the first statement, $_GET is an associative array, not a function. An array holds a collection of variables, where as a function is for executing a block of code. 3) The function isset(), checks for a variable "category" in the URL Yes, mostly. isset(...) takes any variable you pass to it, and determines if it's value is NULL or not. For example: ``` /* given the url http://www.mywebsite.com/mypage.php?category=books */ isset($GET["category"]); // returns true, because category is a parameter that gets passed to the $GET array isset($GET["foobar"]); // returns false, because foobar is not a parameter, so it does not exist in the $GET array isset($myVar); // returns false because $myVar is not defined. ``` 4) If the variable exists in the URL, the $_GET function takes the value from the variable - in this case, "books" Yep, but to clarify the terminology: "If the parameter exists in the URL, the $_GET array takes the value from the parameter" 5) You can then use a conditional statement to see what the value of "category" is, and run a code block Precisely! Here are some documentation links on the relevant topics: - arrays (http://php.net/manual/en/language.types.array.php) - functions (http://php.net/manual/en/functions.user-defined.php) - superglobals (http://php.net/manual/en/language.variables.superglobals.php) - isset (http://php.net/manual/en/function.isset.php) Hope that's helpful.
2 of 2
0
Kristian, You're 100% correct and that code will work without any issues! :) If you need help modifying it or adding more, let me know. -Nick
๐ŸŒ
W3Schools
w3schools.sinsixx.com โ€บ php โ€บ php_get.asp.htm
PHP GET - SinSiXX - W3Schools
Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building.
๐ŸŒ
YouTube
youtube.com โ€บ watch
PHP Tutorial for Beginners 17 # Using $_GET Variables in PHP - YouTube
get - PHP $_GET Variablephp - How to set $_GET variablePHP - easiest way to get $_GET parameters string as writtenPHP: $_GET php $_requestphp $_get arrayphp ...
Published: August 6, 2014
Address: 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
๐ŸŒ
ZetCode
zetcode.com โ€บ php โ€บ getpostrequest
PHP GET/POST request - generating and processing GET and POST requests in PHP
PHP provides the $_GET and $_POST superglobals. The $_GET is an associative array of variables passed to the current script via the URL parameters (query string). The $_POST is an associative array of variables passed to the current script via the HTTP POST method when using application/x-www-form-urlencoded or multipart/form-data as the HTTP Content-Type in the request. In the following example, we generate a GET request with curl tool and process the request in plain PHP.
๐ŸŒ
SitePoint
sitepoint.com โ€บ php
Understanding $_get in PHP - A detailed discussion - PHP - SitePoint Forums | Web Development & Design Community
January 1, 2019 - This resource is more like notes of someone who has mastered the language โ†’ http://php.net/manual/en/reserved.variables.get.php But novice like me seems to be struggling even to grasp the basics of $_GET. I know there โ€ฆ
๐ŸŒ
YouTube
youtube.com โ€บ watch
How to Use $_POST and $_GET in PHP - YouTube
Full source code available at: http://www.johnmorrisonline.com/lesson/working-with-_post-and-_get-in-php/In this video, you'll learn how to access the data i...
Published: April 28, 2013
๐ŸŒ
Studyopedia
studyopedia.com โ€บ home โ€บ php get method
PHP GET Method - Studyopedia
May 4, 2023 - <html> <body> Hi, User: <?php echo $_GET["name"]; ?><br> Your age: <?php echo $_GET["age"]; ?> </body> </html> Here, you can see the output. The URL shows the name and age information since we used the GET method.