I have this code and it just doesn't display properly. What am I overlooking?
<?
session_start();
define ('IN_SITE', 1);
if (!file_exists('includes/config.php')) echo "<script>document.location.href='install/install.php'</script>";
include_once ('includes/global.php');
include_once ('includes/functions_login.php');
include_once ('includes/functions_item.php');
if (eregi('logout', $_GET['option']))
{
logout();
}
include_once ('global_header.php');
if (isset($_GET['change_language']))
{
$all_languages = list_languages('site');
if (in_array($_GET['change_language'], $all_languages))
{
$session->set('site_lang', $_GET['change_language']);
}
$refresh_link = 'index.php';
$template_output .= '<br><p class="contentfont" align="center">' . MSG_SITE_LANG_CHANGED . '<br><br>
Please click <a href="' . process_link('index') . '">' . MSG_HERE . '</a> ' . MSG_PAGE_DOESNT_REFRESH . '</p>';
$template_output .= '<script>window.setTimeout(\'changeurl();\',300); function changeurl(){window.location=\'' . $refresh_link . '\'}</script>';
}
else
{ }
$template_output .=
$howmany = 6;
echo " <table width='100%' border='0' cellpadding='1' cellspacing='3'>";
echo "<tr>";
echo "<td width='50%'><b>Username</b></td>";
echo "<td width='50%'><b>Items Sold</b></td>";
echo "</tr> ";
$newuserquery = "SELECT user_id, username, items_sold from probid_users order by items_sold desc limit 0, $howmany";
$result = mysql_query($newuserquery) or die(mysql_error());
while($row=mysql_fetch_row($result)) {
$newuserid = $row[0];
$newusername = $row[1];
$newuseritems_sold = $row[2];
$newuserlink = $path . "$newuserid,owner_id,other_items";
echo "<tr> ";
echo "<td width='50%'><a href=' " . $newuserlink . " '>" . $newusername . "</a></td>";
echo "<td width='50%'><i>" . $newuseritems_sold . "</i></td>";
echo "</tr>";
}
echo "</table>";
include_once ('global_footer.php');
echo $template_output;
?>
Thanks,
Dan