How can user input, such as a username and password, be passed to a PHP file when using a link instead of a button?

When using a link instead of a button to pass user input, such as a username and password, to a PHP file, you can achieve this by including the input values in the URL as query parameters. In the PHP file, you can then retrieve these values using the $_GET superglobal array.

// Link example: <a href="process.php?username=johndoe&password=example123">Submit</a>

// process.php
$username = $_GET['username'];
$password = $_GET['password'];

// Use $username and $password as needed