$_POST is an associative array of variables passed to the current script via the HTTP POST method.

$_POST['name'] = "Michael";
echo 'Hello ' . htmlspecialchars($_POST['name']) . '!';

You can try to run the script here.

The output in the browser will be:

Hello Michael!

$_POST is mainly used in form processing.  It is an associative array and so we can pass the name Michael using $_POST[‘name’].

Series Navigation<< PHP: $_GET
PHP: String operators >>