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 Including the Footer and Adding Additional Pages

Shirts page not working !

my shirts link is not working even though my code looks perfect

5 Answers

J Scott Erickson
J Scott Erickson
11,883 Points

Could you post the code for us to look at?

Here is the code on my shirts page , i think the php and html looks right , my contact page works so i dont know why this one is not here is

<?php $section = "shirts"; $pageTitle = "Mikes Full cataloug of Shirts"; include('inc/header.php'); ?>

    <div class ="section page">

        <h1>Mike&rsquo;s Full Catalouge of Shirts</h1>

    </div>

<?php include('inc/footer.php'); ?>

J Scott Erickson
J Scott Erickson
11,883 Points

Is this the only page that won't load for you right now? Or are there others where you are getting errors or blank screens?

Yeah , its the only page that is not working , all my other pages work fine.

J Scott Erickson
J Scott Erickson
11,883 Points

can you share the code from your inc/header.php file?

here is goes

<html> <head> <title><?php echo $pageTitle; ?></title> <link rel="stylesheet" href="css/style.css" type="text/css"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700" type="text/css"> <link rel="shortcut icon" href="favicon.ico"> </head> <body>

<div class="header">

    <div class="wrapper">

        <h1 class="branding-title"><a href="./">Shirts 4 Mike</a></h1>

        <ul class="nav">
            <li class="shirts <?php if ($section == "shirts") { echo "on";} ?>"><a href="shirts.php">Shirts</a></li>
            <li class="contact <?php if ($section == "contact") { echo "on";} ?>"><a href="contact.php">Contact</a></li>
            <li class="cart"><a href="#">Shopping Cart</a></li>
        </ul>

    </div>

</div>

<div id="content">