Menu
×
×
Correct!

Exercise:

If the form in the white section below gets submitted, how can you, in welcome.php, output the value from the "first name" field?.

Hint: The http method is not the same as in Exercise 1.

<form action="welcome.php" method="post"> First name: <input type="text" name="fname"> </form>
<html> <body> Welcome <?php echo $_POST["fname"]; ?> </body> </html>
<form action="welcome.php" method="post"> First name: <input type="text" name="fname"> </form>
<html> <body> Welcome <?php echo $_POST['fname']; ?> </body> </html>

Not Correct

Click here to try again.

Correct!

Next ❯
<form action="welcome.php" method="post"> First name: <input type="text" name="fname"> </form>
<html> <body> Welcome <?php echo ; ?> </body> </html>

  
  
  




Go to w3schools.com
Reset Score
Close This Menu

Completed 0 of 47 Exercises:

PHP Syntax
PHP Variables
PHP Strings
PHP Operators
PHP If...Else
PHP Switch
PHP Loops
PHP Functions
PHP Arrays
PHP Forms
PHP Dates
PHP Advanced





×

Reset the Score?

This will reset the score of ALL 47 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 47 PHP exercises.

Share your score on facebook: