An HTML form has two submit buttons. After submitting the form, how can you determine with PHP which button was clicked?

An HTML form has two submit buttons. After submitting the form, how can you determine with PHP which button was clicked?
A . An HTML form may only have one button.
B . You cannot determine this with PHP only. You must use JavaScript to add a value to the URL depending on which button has been clicked.
C . Put the two buttons in different forms, but make sure they have the same name.
D . Assign name and value attributes to each button and use $_GET or $_POST to find out which button has been clicked.

Answer: D

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments