Files
developer-roadmap/roadmaps/php/content/_post@qNG-a4iIO-puZsMwAMzYC.md
T
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

836 B

$_POST

$_POST is a superglobal variable in PHP that's used to collect form data submitted via HTTP POST method. Your PHP script can access this data through $_POST. Let's say you have a simple HTML form on your webpage. When the user submits this form, the entered data can be fetched using $_POST. Here's a brief example:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $name = $_POST["name"];
}
?>

In this code, $_POST["name"] fetches the value entered in the 'name' field of the form. Always be cautious when using $_POST as it may contain user input which is a common source of vulnerabilities. Always validate and sanitize data from $_POST before using it.

Visit the following resources to learn more: