if ($_SERVER["REQUEST_METHOD"] == "GET") { // Get the value of the name input field $name = $_GET['name']; // Display the value echo "Hello " . $name . "!"; }
if ($_SERVER["REQUEST_METHOD"] == "GET") { // Get the values of the name and email input fields $name = $_GET['name']; $email = $_GET['email']; // Display the values echo "Name: " . $name . "In this example, we retrieve the values of two form fields named "name" and "email" using `getData()`. We then display the values on the page. These examples do not use a specific package library as `getData()` is a built-in function in PHP.
"; echo "Email: " . $email; }