What best practice should be followed when passing parameters in a form action attribute in PHP?

When passing parameters in a form action attribute in PHP, it is best practice to use the POST method instead of the GET method. This is because using the GET method will expose the parameters in the URL, making them visible to users and potentially leading to security vulnerabilities. By using the POST method, the parameters are sent in the request body instead of the URL, keeping them hidden from users.

<form method="post" action="process_form.php">
  <input type="text" name="username">
  <input type="password" name="password">
  <button type="submit">Submit</button>
</form>