An example of a superglobal in PHP is $_POST, which is used to collect form data sent with the ______ method.

  • POST
  • GET
  • REQUEST
  • SUBMIT
The correct option is 1. An example of a superglobal in PHP is $_POST. The $_POST superglobal is used to collect form data sent with the POST method. When an HTML form is submitted with the POST method, the form data is available in the $_POST superglobal as an associative array. The $_POST superglobal allows you to access the form data and process it in your PHP script. It is commonly used to handle form submissions and perform actions based on the submitted data. Other superglobals in PHP include $_GET, $_REQUEST, and $_SERVER. Learn more: https://www.php.net/manual/en/reserved.variables.post.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *