nerdexam
Zend

200-530 · Question #7

You have the following code in the welcome.html file: <form action="welcome.php" method="post"> Your Name: <input type="text" name="fname" /> Your Girl Friend Name: <input type="text" name="fname"…

The correct answer is D. Welcome Maria and Maria! See the full explanation below for the reasoning.

Question

You have the following code in the welcome.html file: <form action="welcome.php" method="post"> Your Name: <input type="text" name="fname" /> Your Girl Friend Name: <input type="text" name="fname" /> <input type="submit" /> </form> The PHP code of the welcome.php file is as follows: Welcome <?php echo $_POST["fname"];?> and <?php echo $_POST["fname"];?>! What will be the output if you give your name as John and your girlfriend's name as Maria?

Options

  • AWelcome John and Maria!
  • BWelcome Maria and John!
  • CThe script will return an error.
  • DWelcome Maria and Maria!
  • EWelcome John and John!

How the community answered

(58 responses)
  • A
    2% (1)
  • B
    5% (3)
  • C
    10% (6)
  • D
    81% (47)
  • E
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice