How to input Two submit buttons in one form in HTML

if you give each one a name, the clicked one will be sent through as any other input

This method is better for internationalization. For example, if the page is rendered in Spanish, the text of the buttons will likely be different. So having the logic of your code depend on the text of that button will break in that case. Going by the name is safer, as it is a value that is not displayed to the user and therefore can be treated more as a “private” variable and less as a message to users.

<input type="submit" name="button_1" value="Click me">