$_POST

The $_POST superglobal is an associative array containing data sent to the server using the HTTP POST method.

PHP superglobals are built-in variables that are always accessible in all scopes.

$_POST is most commonly used to handle form submissions where the <form> element has method="post". Each form field’s name attribute becomes a key in the $_POST array.

Because POST data comes from user input, values should always be validated and sanitized before use. A common pattern is to first check the request method and ensure the expected key exists before accessing it.

POST requests are typically used for actions that submit sensitive data or modify application state.