When creating an HTML form with insertion into the database, you can point the action
of the form to the page itself or to another PHP script. I am in doubt about which would be the best option.
I always use a second page, and I make the second page validation too, if the password is wrong (for example, if it is a login form), I display a warning and redirect to the previous page.
Would it be advantageous for me to do it any other way? What are the differences between the two options?