My html form (form.php) has two submit buttons - "Add" and "Delete".
How to write a php program to handle them?
i.e. when the "Apply" button is pressed, a "Add" page is displayed;
when the ""Delete" button is pressed, a ""Delete" page is displayed - only the data which will be deleted is displayed, then prompt the user for deletion.
My idea is:
add this at the form.php:
form action="handle.php" method="post"
Inside handle.php, check which button is pressed and handle accordingly.
Is this right or there is a better way?