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

Mike Zhu
1,840 PointsMeaning of a question mark "?" in the url
I am completely new in php and actually, I come across with understanding the meaning of the question mark in the following code:
header("Location: contact.php?status=thanks");
I don't understand what the use of the question mark before status. I guess it set the "status" as an ID with the "thanks" as a value. Is that right?
Besides, I am not sure, why this ID of "status" and value of "thanks" will be included in the $_GET array, and in the video we can use like this:
$_GET["status"] == thanks
1 Answer

Andrew Shook
31,709 PointsMike, in PHP there are two main ways to communicate things between the browser and the server, $_POST and $_GET. $_GET information is passed via the url, and the "?" lets the server know where the $_GET variables start.