In the context of PHP form handling, what are the advantages and disadvantages of using type="submit" versus type="button" for form buttons?

When handling forms in PHP, using type="submit" for form buttons is recommended because it automatically submits the form data to the server. On the other hand, using type="button" will not trigger form submission by default, requiring additional JavaScript code to handle the submission. Therefore, it is more convenient and straightforward to use type="submit" for form buttons in PHP form handling.

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