PrepAway - Latest Free Exam Questions & Answers

which button was clicked?

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

PrepAway - Latest Free Exam Questions & Answers

A.
An HTML form may only have one button.

B.
Hook up JavaScript the form to add a value to the URL depending on which button has been
clicked.

C.
Put the two buttons in individual form elements with different action attribute.

D.
Assign name and value attributes to each button and use $_GET or $_POST to find out which
button has been clicked.

One Comment on “which button was clicked?


Leave a Reply

Your email address will not be published. Required fields are marked *