The PHP Request POST method is used to collect data submitted in a HTML form and send it to the server for processing. The POST method does not display data submitted on the URL, which makes it more secure than GET method.
In PHP, the $_POST global variable is used to collect data submitted through a form using POST method. The variable contains an associative array of input value pairs where the input name is the key and the input value is the value. Here are a few examples.
Example 1: Collecting and displaying input data from a form
";
echo "Email: " . $email . " ";
}
?>
Example 2: Inserting form data into a database
prepare($sql);
$stmt->execute(['name' => $name, 'email' => $email]);
echo "Member created successfully";
}
?>
The PHP Request POST method is part of the PHP core language and does not require any external package or library.
PHP Request::POST - 1 examples found. These are the top rated real world PHP examples of Request::POST from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples.