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 trialmichaelleonard4
7,013 Points[SOLVED] The $_GET variable does not set up in the browser!
For example when i press on books it just goes to catalog.php, not catalog.php?cat=books and i did all that was done in the video please help me!
michaelleonard4
7,013 Pointsthanks but i found my solution
Jeff Lemay
14,268 PointsAwesome. Would you mind posting your solution as an answer below so the question can be marked as resolved?
Jason Anello
Courses Plus Student 94,610 Pointsadded [SOLVED] to title
1 Answer
jason chan
31,009 Points// catalog.php
<?php
$pageTitle = "Full Catalog";
if ($_GET['cat'] == "books") {
$pageTitle = 'Books';
} else if ($_GET['cat'] == "movies") {
$pageTitle = 'Movies';
} else if ($_GET['cat'] == 'music') {
$pageTitle = 'Music';
}
include("inc/header.php"); ?>
<div class="section page">
<h1>Full Catalog</h1>
</div>
<?php include("inc/footer.php"); ?>
Don't forget to CTLR-S
Jeff Lemay
14,268 PointsJeff Lemay
14,268 PointsPost your code here so we can take a look.