Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Adding a Contact Form Form Submissions

$_GET variable and name status in quiz

I can't figure out what to put in the blank. So far I've added $status=name and $status=Randy and they are both wrong. Can someone please help?

The $_GET array contains variables added to the web address. If I want my first name (Randy) displayed by this PHP command ...

echo $_GET["name"];

ā€¦ then what needs to be added to the end of the web address?

http://localhost/contact-thanks.php

Hi ADELINE, where did you learn how to fly?

3 Answers

Keith Kelly
Keith Kelly
21,326 Points

What they are looking for is:

?name=Randy

So the entire address would be http://localhost/contact-thanks.php?name=Randy

The question mark is starting the query with the variable of name and a value of Randy.

May Loh
May Loh
5,213 Points

Thanks! Why isn't it:

?name="Randy"

Randy is a string, isn't it?

AH!!!! Awesome. Thank you!!!