What is the role of GET and ECHO in passing values from one page to a contact form in PHP?

When passing values from one page to a contact form in PHP, you can use the GET method to retrieve values from the URL parameters and the ECHO function to display those values in the form fields. This allows you to pre-fill the form with the data passed from the previous page.

// Retrieve values from URL parameters using GET method
$name = $_GET['name'];
$email = $_GET['email'];

// Display values in the contact form using ECHO
<input type="text" name="name" value="<?php echo $name; ?>">
<input type="email" name="email" value="<?php echo $email; ?>">