Superglobals
$_GET, $_POST, $_SERVER, $_COOKIE, $_SESSION and $_FILES carry request data. Always validate input.
Example
$_GET["name"] = "Ada";
$name = htmlspecialchars($_GET["name"] ?? "guest");
echo "Hello $name";Result
Hello Ada
Exercise
Query data.
$["q"]
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.