Tsallaka zuwa abun ciki
Justice Tech School

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

Which holds form POST data?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.