Sorry for the spam but the entire code is as follows:
<? function doheader()
{ global $gallery, $sitetitle, $gallery; ?>
<html>
<head>
<title>Goalie Pages</title>
<link href="../../style01.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="474" height="52" valign="top"><a href="http://www.goaliepages.com/index.php"><img src="../../images/newgoalie06_01.jpg" alt="Top Left Goalie Title Banner" border="0"></a></td>
<td width="71" height="124" rowspan="2" valign="top"><img src="../../images/newgoalie06_02.jpg" alt="Top image"></td>
<td rowspan="2" height="124" background="../../images/bg_top01.jpg" valign="top"></td>
<td rowspan="2" width="93" height="124" valign="top" align="right"><img src="../../images/newgoalie06_04.jpg" alt="Top left"></td>
</tr>
<tr>
<td width="474" height="72" align="center" valign="bottom" bgcolor="#666666">
<?PHP
$db = mysql_connect("localhost", "username", "password");
mysql_select_db("kazlaaz_goalie",$db);
$result=mysql_query("select from banners");
$row=mysql_num_rows($result);
srand((double)microtime()1000000);
$random=rand(1,$row);
$imagenum=mysql_query("select * from banners where ID=$random");
while ($image=mysql_fetch_array($imagenum))
{
printf("<a href=\"$image[2]\" target=\"_blank\"><img src=\"$image[1]\" border=0></a>");
}
?>
</td>
</tr>
<tr>
<td colspan="4"></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td width="200" valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" colspan="3"><img src="../../images/nav_top01.jpg" alt="top nav image" width="153" height="28"></td>
</tr>
<tr>
<td width="7" valign="top" background="../../images/leftnavbg01.jpg"></td>
<td width="139" valign="top" bgcolor="#666699">
<?php
$db = mysql_connect("localhost", "username", "password");
mysql_select_db("kazlaaz_goalie",$db);
$result = mysql_query("SELECT * FROM navigation",$db);
while($myrow = mysql_fetch_array($result))
{
echo "<hr"." "."align=\"left\""." "."width=\"25%\""." "."noshade"." "."color=\"#9999CC\"".">";
echo "<a"." "."id=\"nav\""." "."href=\"".$myrow["url"]."\">".$myrow["name"]."</a>";
echo "<br>";
}
?>
<br>
<br>
</td>
<td width="7" valign="top" background="../../images/leftnavbg02.jpg"> </td>
</tr>
<tr bgcolor="#FFCC00">
<td height="5" colspan="3"></td>
</tr>
</table>
</td>
<td width="100%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="55" height="28"><img src="../../images/top_left_center.jpg" width="55" height="28"></td>
<td width="5" background="../../images/center.jpg"> </td>
<td align="center" background="../../images/center.jpg"><font color="#FFCC00"><img src="../../images/title_welcome01.jpg" alt="top title image" width="95" height="19"></font></td>
<td width="5" background="../../images/center.jpg"> </td>
<td width="55" height="28"><img src="../../images/top_right_center.jpg" width="55" height="28"></td>
</tr>
<tr>
<td background="../../images/center_left_center.jpg"> </td>
<td bgcolor="#666699"> </td>
<td bgcolor="#666699"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="19" height="19"><img src="../../images/yel_topleft.jpg" width="19" height="19"></td>
<td background="../../images/yel_midtop.jpg"> </td>
<td width="19" height="19"><img src="../../images/yel_topright.jpg" width="19" height="19"></td>
</tr>
<tr>
<td background="../../images/yel_midleft.jpg" bgcolor="#FFCC00"> </td>
<td bgcolor="#FFCC00">
<?
}
function dofooter()
{?>
<div align="center">
<p><a href="http://www.goaliepages.com/index.php" id="onyellow">Home</a>
<? ListGalleries(h); ?>
</p>
</div>
</td>
<td background="../../images/yel_midright.jpg"> </td>
</tr>
<tr>
<td width="19" height="19"><img src="../../images/yel_bottomleft.jpg" width="19" height="19"></td>
<td background="../../images/yel_midbottom.jpg"> </td>
<td width="19" height="19"><img src="../../images/yel_bottomright.jpg" width="19" height="19"></td>
</tr>
</table>
<br>
</td>
<td bgcolor="#666699"> </td>
<td background="../../images/center_right_center.jpg"> </td>
</tr>
<tr bgcolor="#FFCC00">
<td height="5"></td>
<td height="5"></td>
<td height="5"></td>
<td height="5"></td>
<td height="5"></td>
</tr>
</table></td>
<td width="200" valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="153" height="28" colspan="3"><img src="../../images/nav_associates01.jpg" alt="associates title" width="153" height="28"></td>
</tr>
<tr>
<td width="7" valign="top" background="../../images/leftnavbg01.jpg"> </td>
<td width="139" bgcolor="#666699"> <br>
<?php
$db = mysql_connect("localhost", "username", "password");
mysql_select_db("kazlaaz_goalie",$db);
$result = mysql_query("SELECT * FROM banners_side",$db);
while($myrow = mysql_fetch_array($result))
{
echo "<a"." "."target=\"_blank\""." "."id=\"nav\""." "."href=\"".$myrow["url"]."\"><img"." "."border=\"0\""." "."src=\"".$myrow["filename"]."\"></a>";
echo "<p>";
}
?>
</td>
<td width="7" valign="top" background="../../images/leftnavbg02.jpg"> </td>
</tr>
<tr>
<td height="5" colspan="3" bgcolor="#FFCC00"></td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="153" height="28" colspan="3"><img src="../../images/nav_vote01.jpg" alt="vote title" width="153" height="28"></td>
</tr>
<tr>
<td width="7" valign="top" background="../../images/leftnavbg01.jpg"></td>
<td width="139" valign="top" bgcolor="#666699">
<br>
<?PHP
$db = mysql_connect("localhost", "username", "password");
mysql_select_db("kazlaaz_goalie",$db);
$result=mysql_query("select from poll_rotation");
$row=mysql_num_rows($result);
srand((double)microtime()1000000);
$random=rand(1,$row);
$imagenum=mysql_query("select * from poll_rotation where ID=$random");
while ($image=mysql_fetch_array($imagenum))
{
include '/home/kazlaaz/public_html/goalies/poll/booth.php';
display_booth($image[0]);
}
mysql_close($db);
?>
<br>
</td>
<td width="7" valign="top" background="../../images/leftnavbg02.jpg"> </td>
</tr>
<tr bgcolor="#FFCC00">
<td height="5" colspan="3"></td>
</tr>
</table>
<p></p>
</td>
</tr>
</table>
</body>
</html>
<? } ?>
<?
function dofooteradmin()
{?>
<div align="center">
<p><a href="index.php">Home</a> <? ListGalleries(h); ?> | <a href="help.php" onClick="NewWindow('help.php','Help','650','500','yes','center'); return false" onFocus="this.blur()">Help</a> </p>
</div>
</body>
</html>
<? } ?>
[/COLOR]
It's a lot to scan through... and I know the problem is probably very simple, thanks for the help,
Jessica