In what situations should the ".php" extension be included in the action attribute of a form submission in PHP?

When submitting a form in PHP, the ".php" extension should be included in the action attribute of the form if the form data needs to be processed by a PHP script on the server. This ensures that the form data is submitted to the correct PHP script for processing. If the ".php" extension is not included, the form data may not be processed correctly or at all.

<form action="process_form.php" method="post">
  <!-- form fields go here -->
  <input type="submit" value="Submit">
</form>