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 Creating the Menu and Footer Adding Active States to the Navigation

victor romano
PLUS
victor romano
Courses Plus Student 33,295 Points

You forgot to mention in the video, to add empty Variable in the index page...

Without setting a variable, the home page breaks down. Add a note about it

<$php $section = " "; ?>

1 Answer

At the current stage of the project not having the $section variable set on the index page won't break the page since you're not setting the conditional to the h1. However, you'd probably want to set the $section variable to "home" like the project files show. I can't remember, but it seems like that was important in later steps.

Edit: actually even if you did set the conditional to the h1, it still wouldn't break the page at the current stage of the project.