if ($_SERVER['REQUEST_METHOD'] == 'POST') { $name = $_POST['name']; echo "Hello, $name!"; }
if ($_SERVER['REQUEST_METHOD'] == 'POST') { $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; // do something with the values retrieved }In this example, we retrieve the values of the 'name', 'email' and 'message' input fields from the form and store them in separate variables. We can then use these variables in any way we need to, such as sending an email or saving the information to a database. Package library: The request option is a built-in feature in PHP, and does not require any external package or library to use.