PHPPHP11 min read

PHP Superglobals: $_GET, $_POST, $_SERVER

Access request data and server info using PHP superglobal arrays.

Brian Watson
December 21, 2025
0.0k0

Superglobals are built-in arrays always available in PHP. ## $_GET example URL: `page.php?name=Alex` ```php echo $_GET['name']; ``` ## $_POST example HTML form: ```html <form method="post"> <input name="email"> <button>Send</button> </form> ``` PHP: ```php if ($_SERVER['REQUEST_METHOD'] === 'POST') { echo $_POST['email']; } ``` ## $_SERVER ```php echo $_SERVER['REQUEST_URI']; ``` > Next: Handling forms safely.

#PHP#Forms#Beginner