Yeah my entire header looks like this:
<div id="container">
<header>
<section class="header_fix">
<a class="logo" href="http://www.modmydesktop.com"></a><!-- /.logo -->
<section class="contact_detail">Stay Connected to MMD</section><!-- /.contact_detail -->
<section class="social_links">
<a href="http://feeds.feedburner.com/ModMyDesktop-Rss" class="rss"></a>
<a href="http://plus.google.com/u/0/104234050699130600340" class="google"></a>
<a href="http://www.youtube.com/modmydesktop" class="youtube"></a>
<a href="http://www.facebook.com/mod.mydesktop" class="facebook"></a>
<a href="http://www.twitter.com/modmydesktop" class="twitter"></a>
</section><!-- /.social_links -->
</section><!-- /.header_fix -->
</header><!-- /header -->
<nav>
<section class="nav_fix">
<section class="nav_fix_in">
<ul class="main-menu">
<li <?php if($mmd_navcurrent == 1){ echo " class=\"current_page_item\""; } ?>><a href="http://www.modmydesktop.com">Mod My Desktop</a>
<ul>
<li><a href="http://www.modmydesktop.com">Home</a></li>
<li><a href="http://www.modmydesktop.com/latest">Latest Video</a></li>
</ul>
</li>
<li <?php if($mmd_navcurrent == 2){ echo " class=\"current_page_item\""; } ?>><a href="http://www.modmydesktop.com/tutorials">Computer Tutorials</a>
<ul>
<li><a href="http://www.modmydesktop.com/customize">Customize Desktop</a></li>
<li><a href="http://www.modmydesktop.com/speed">Computer Speed</a></li>
<li><a href="http://www.modmydesktop.com/tips">Tips & Tweaks</a></li>
<li><a href="http://www.modmydesktop.com/video">Video Tutorials</a></li>
</ul>
</li>
<li <?php if($mmd_navcurrent == 3){ echo " class=\"current_page_item\""; } ?>><a href="http://www.modmydesktop.com/gallery/">Gallery</a>
<ul>
<li><a href="http://www.modmydesktop.com/gallery/index-3.html">Desktop Wallpapers</a>
<ul class="secondary">
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-7.html">Clean & Simple</a></li>
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-8.html">Abstract</a></li>
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-9.html">Gaming</a></li>
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-10.html">Blondes/Brunettes</a></li>
</ul>
</li>
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-2.html">Windows Themes</a></li>
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-3.html">Rainmeter Skins</a></li>
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-4.html">Dock Themes</a></li>
<li><a href="http://www.modmydesktop.com/gallery/thumbnails-5.html">Icon Sets</a></li>
</ul>
</li>
<li <?php if($mmd_navcurrent == 4){ echo " class=\"current_page_item\""; } ?>><a href="http://www.modmydesktop.com/forums/">Forums</a></li>
<li <?php if($mmd_navcurrent == 5){ echo " class=\"current_page_item\""; } ?>><a href="http://www.modmydesktop.com/contact">Contact</a></li>
<?php
if(!USER_ID)
{
echo '
<li class="buynow">MMD Login</a>
<ul class="mmdlogin">
<div id="menulogin">
<form action="../forums/member.php" method="post">
<fieldset>
<table class="login" width="100%">
<tr>
<td class="login" width="15%" height="35px">
<label for="author">Username</label>
</td>
<td class="login" width="85%" height="35px">
<input type="text" class="inputlogin" id="login_user" name="username" size="25" maxlength="30" /><br />
</td>
</tr>
<tr>
<td class="login" width="15%" height="35px">
<label for="comment">Password</label>
</td>
<td class="login" width="85%" height="35px">
<input type="password" class="inputlogin" id="login_pass" name="password" size="25" />
</td>
</tr>
<input type="hidden" id="action" name="action" value="do_login">
<input type="hidden" id="url" name="url" value="index.php" />
<tr>
<td class="login" width="15%" height="30px">
</td>
<td class="login" width="85%" height="30px">
<input name="submit" type="submit" id="submitlogin" tabindex="5" value="Login" />
</td>
</tr>
</table>
</fieldset>
</form>
Not a member? <a href="http://www.modmydesktop.com/forums/member.php?action=register" class="loginlink">Register Now!</a>
</div>
</ul>
</li>
';
}
else
{
global $REFERER;
list($timestamp, $form_token) = getFormToken();
$mmd_username = USER_NAME;
DEFINE ('MMD_LOGUSER', 'xxxmyusernamexxx');
DEFINE ('MMD_LOGPASS', 'xxxmypasswordxxx');
DEFINE ('MMD_LOGHOST', 'localhost');
DEFINE ('MMD_LOGNAME', 'xxxmydbxxx');
$connection = mysql_connect(MMD_LOGHOST, MMD_LOGUSER, MMD_LOGPASS);
@mysql_select_db(MMD_LOGNAME) or die("Unable to select database");
$res = mysql_query("SELECT * FROM `mybb_users` WHERE `username` = '$mmd_username'") or die(mysql_error());
while($row = mysql_fetch_array($res))
{
if($row['avatar'] != "")
{
$avatar = "http://www.modmydesktop.com/forums/{$row['avatar']}";
}
else
{
$avatar = "http://www.modmydesktop.com/forums/images/mmdefaultavatar.png";
}
$mmd_unreadpms = $row['unreadpms'];
}
echo '
<li class="loggedin"><img src="'.$avatar.'" id="logavatar" height="30" width="30" />User: '.$mmd_username.'</a>
<ul>
<li class="loggedmenu"><a href="http://www.modmydesktop.com/forums/usercp.php">Control Panel</a>
<li class="loggedmenu"><a href="http://www.modmydesktop.com/forums/private.php">PM\'s [ '.$mmd_unreadpms.' ]</a></li>
<li class="loggedmenu"><a href="logout.php?form_token='.$form_token.'&timestamp='.$timestamp.'&referer='.$REFERER.'">Logout</a></li>
</ul>
</li>
';
mysql_close($connection);
}
?>
</ul>
</section><!-- /.nav_fix_in -->
</section><!-- /.nav_fix -->
</nav><!-- /nav -->
The divs that are opened in the header and closed properly in the footer. Without the connecting to SQL code, everything works fine. With it, though, I get that error.