How can one ensure that the selected data from a form is properly passed via GET method in PHP?

When passing data from a form using the GET method in PHP, it is important to ensure that the form input names match the keys used to access the data in the $_GET superglobal array. This can be achieved by setting the form action attribute to the PHP file handling the form submission and using the name attribute in the form inputs to specify the keys for the data.

<form action="process_form.php" method="GET">
    <input type="text" name="username">
    <input type="email" name="email">
    <button type="submit">Submit</button>
</form>
```

In the process_form.php file, you can access the submitted data using the $_GET superglobal array like this:

```php
$username = $_GET['username'];
$email = $_GET['email'];