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 trialOliver Williams
6,278 PointsI don't understand how the pages are able to display their h1 title when catalogue.php is not a include file.
I don't understand how the pages h1 tag are able to display a title according to the if else statement in catalogue.php seeing as catalogue.php is not an include file.
2 Answers
Codin - Codesmite
8,600 Pointscatalog.php is not included as it is catalog.php that is being viewed in the video, it would not need to include itself.
The header gets it's value from the GET request and the value stored in the URL.
For example http://treehouse-app.com/catalog.php?cat=music
_GET['cat'] is stored as a variable in url with the value music.
In the video Alena is using _GET variables stored in the URL to change the content of the pages header.
Codin - Codesmite
8,600 PointsCodin - Codesmite
8,600 PointsHi,
Could you link us to the video/question or paste the code here for us to see?
Than we should be able to help explain how it works.