U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend 200-710 Exam - Topic 3 Question 39 Discussion

An HTML form has two submit buttons. After submitting the form, how can you determine with PHP which button was clicked?
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.
A) An HTML form may only have one button.
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.

Zend 200-710 Exam - Topic 3 Question 39 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 39
Topic #: 3
[All 200-710 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Gregoria
8 months ago
Nope, PHP can handle it with $_POST or $_GET.
upvoted 0 times
...
Geraldine
8 months ago
I thought you needed JavaScript for that.
upvoted 0 times
...
Rosio
8 months ago
Wait, can PHP really tell which button was clicked?
upvoted 0 times
...
Lorita
8 months ago
Agree, just use name and value attributes!
upvoted 0 times
...
Rickie
8 months ago
You can definitely have multiple buttons in a form.
upvoted 0 times
...
Cherry
9 months ago
I'm pretty sure the correct approach is to use the name and value attributes for each button and then check them with $_POST or $_GET.
upvoted 0 times
...
Lino
9 months ago
I feel like I read somewhere that using JavaScript is necessary for this, but I can't recall the details.
upvoted 0 times
...
Chantay
9 months ago
I practiced a similar question, and I believe you need to assign different names or values to each button to identify which one was clicked.
upvoted 0 times
...
Nikita
9 months ago
I think I remember that you can have multiple buttons in a form, but I'm not sure how to differentiate them in PHP.
upvoted 0 times
...
Antione
9 months ago
This seems like a straightforward question about location accuracy factors. I'm pretty confident I can identify the two correct answers.
upvoted 0 times
...
Marisha
9 months ago
Okay, I've got this. The Scrum Master needs to consider the value, dependencies, and risk of the product backlog items. That's the core of what the question is asking for. I'll select the option that includes those three factors.
upvoted 0 times
...
Louvenia
9 months ago
I've got this one! The answer is D, parseResponse. That's the callback method that's required when invoking a SOAP service, as it's used to parse the SOAP response. The other options are more general and not specific to SOAP services.
upvoted 0 times
...
Alica
9 months ago
Hmm, I'm a bit unsure about this one. I know a BCP is important for disaster recovery, but I'm not sure if that's the most important thing for IT governance specifically. The fault-tolerant hardware and incident response plan also seem like they could be important. I'll have to think this through carefully.
upvoted 0 times
...
Marci
9 months ago
Based on the details provided, I believe the 'Preparation' phase should include the steps of checking the input folder, waiting for files, reading the files and loading the queue, and logging into the applications. This sets the stage for the automated process to then execute the remaining steps.
upvoted 0 times
...
Maybelle
1 year ago
I heard the exam committee was trying to stump the candidates with a 'trick question', but they ended up tripping over their own feet. Guess they need to work on their HTML-PHP integration skills.
upvoted 0 times
Rossana
12 months ago
Definitely. It's a good skill to have for web development projects.
upvoted 0 times
...
Alease
1 year ago
Yeah, it's all about using the right attributes and methods to handle form submissions in PHP.
upvoted 0 times
...
Willow
1 year ago
That makes sense. It's important to properly name and assign values to the buttons for PHP to determine which one was clicked.
upvoted 0 times
...
Marguerita
1 year ago
I think the answer is D) Assign name and value attributes to each button and use $_GET or $_POST to find out which button has been clicked.
upvoted 0 times
...
...
Pedro
1 year ago
Option A? Really? Who writes these questions, my grandma? Everyone knows an HTML form can have multiple submit buttons!
upvoted 0 times
Jesusita
1 year ago
Yeah, option A doesn't make sense at all.
upvoted 0 times
...
Marsha
1 year ago
I agree, using $_GET or $_POST is the way to go.
upvoted 0 times
...
Tien
1 year ago
I think option D is the correct answer.
upvoted 0 times
...
...
Blondell
1 year ago
Option B seems logical, but why would we want to use JavaScript when we can do it all with PHP? That's like using a sledgehammer to crack a nut.
upvoted 0 times
Yan
1 year ago
It's always good to know the different options available, but PHP can definitely handle this task efficiently.
upvoted 0 times
...
Carisa
1 year ago
Using JavaScript might be unnecessary in this case. PHP can handle it just fine.
upvoted 0 times
...
Rusty
1 year ago
Option D is the correct answer. You can use $_POST to determine which button was clicked.
upvoted 0 times
...
...
Elise
1 year ago
I'm pretty sure Option C is correct. Putting the buttons in separate forms with the same name should work, right? Gotta love those workarounds!
upvoted 0 times
Kate
1 year ago
Agreed! It's all about thinking outside the box when it comes to coding.
upvoted 0 times
...
Ty
1 year ago
Definitely! Sometimes you have to get creative with your approach to solve a problem.
upvoted 0 times
...
Levi
1 year ago
That's a clever workaround! It's always interesting to find solutions like that.
upvoted 0 times
...
Dallas
1 year ago
Yes, Option C is the correct choice. Putting the buttons in separate forms with the same name will help determine which one was clicked.
upvoted 0 times
...
Kris
1 year ago
No problem! Glad I could help. Option D is definitely the way to go in this case.
upvoted 0 times
...
Annmarie
1 year ago
Oh, I see. Thanks for clarifying that! Option D it is then.
upvoted 0 times
...
Santos
1 year ago
Actually, Option D is the way to go. You can use $_GET or $_POST to find out which button was clicked.
upvoted 0 times
...
Kenneth
1 year ago
I think Option D is the correct way to determine which button was clicked.
upvoted 0 times
...
...
Polly
1 year ago
Option D is the correct answer. Assigning unique names and values to the submit buttons allows you to easily identify which one was clicked using PHP's superglobal arrays.
upvoted 0 times
Jillian
1 year ago
Actually, you can have multiple submit buttons and use unique names and values to determine which one was clicked with PHP.
upvoted 0 times
...
Stephaine
1 year ago
I always thought you could only have one submit button on a form.
upvoted 0 times
...
...
Veronika
1 year ago
I'm not sure, but I think C could also work. Putting the buttons in different forms with the same name.
upvoted 0 times
...
Nancey
1 year ago
I disagree, I believe the answer is B. You need to use JavaScript to add a value to the URL.
upvoted 0 times
...
Ettie
1 year ago
I think the answer is D. You can use $_GET or $_POST to determine which button was clicked.
upvoted 0 times
...

Save Cancel