$_REQUEST in PHP
The $_REQUEST
superglobal is used to collect data after submitting forms. It contains data from $_GET
, $_POST
, and $_COOKIE
.
Example of Using $_REQUEST
<?php
// Assuming a form submission with a field named 'name'
echo "Name: " . $_REQUEST['name'] . "\n";
?>
Output:
Name: John Doe
Explanation: This example demonstrates how to retrieve form data using the $_REQUEST
superglobal.