Notice the difference in the color highlighting between the original code LaserLight copied for you within "php" vB code tags and the following:
<?php
echo "<a href=/index.php>Home</a><br/>";
if (isset($_COOKIE['gryffindor']))
echo "<a href=/forum/viewforum.php?id=7>Common Room</a>";
elseif (isset($_COOKIE['slytherin']))
echo "<a href=/forum/viewforum.php?id=16>Common Room</a>";
else
echo "You haven't been sorted yet";
?>
You also left out some semi-colons at the end of some of the echo commands, which I inserted above.
A suggestion: while you can "get away with" not using braces around the commands following if/elseif/else conditionals when the command is only one line, it's probably a good habit to go ahead and use them anyway so as to avoid logic errors later on if you add more functionality to a given condition:
<?php
echo "<a href=/index.php>Home</a><br/>";
if (isset($_COOKIE['gryffindor']))
{
echo "<a href=/forum/viewforum.php?id=7>Common Room</a>";
}
elseif (isset($_COOKIE['slytherin']))
{
echo "<a href=/forum/viewforum.php?id=16>Common Room</a>";
}
else
{
echo "You haven't been sorted yet";
}
?>