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 trialKaralyn Heath
18,033 PointsUsing Variables for the Title Tag not working
Getting Undefined variable notice on $pageTitle while trying to preview in Workspace. Not sure what I'm missing. Here are my header.php and suggest.php files.
<html>
<head>
<title><?php echo $pageTitle; ?></title>
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<div class="header">
<div class="wrapper">
<h1 class="branding-title"><a href="./">Personal Media Library</a></h1>
<ul class="nav">
<li class="books"><a href="catalog.php?cat=books">Books</a></li>
<li class="movies"><a href="catalog.php?cat=movies">Movies</a></li>
<li class="music"><a href="catalog.php?cat=music">Music</a></li>
<li class="suggest"><a href="suggest.php">Suggest</a></li>
</ul>
</div>
</div>
<div id="content">
<?php
$pageTitle = "Suggest a Media Item";
include("inc/header.php"); ?>
<div class="section page">
<h1>Suggest a Media Item</h1>
</div>
<?php include("inc/footer.php"); ?>
Andrew Blackwell
13,264 PointsAndrew Blackwell
13,264 PointsExperiencing same problem...