PHP $_POST
PHP $_POST is an associative array of variables passed to the current script via the HTTP POST method.
$_POST is a method="post".
Example
In this example, we have an HTML form with method="post". The data submitted (the message input) can be accessed once the form is submitted using $_POST['message'].
<?phpif(isset($_POST['submit'])){echo $_POST['message'];}?><html><body><form method="post" action=""><input type="text" name="message"><input type="submit" name="submit"></form></body></html>
Free Resources
Copyright ©2026 Educative, Inc. All rights reserved