ok here is the code i hope this solve your problem.....
<?PHP
if (eregi("modules/rankings/top5.php", $_SERVER['SCRIPT_NAME'])) { die ("Access Denied"); }
?> <style type="text/css">
<!--
.style3 {color: #FFFFFF}
.top5 {font-family: Verdana, Helvetica, sans-serif;
color: #CCCCCC;
font-size: 12px;
}
-->
</style>
<?
$query = "SELECT TOP 5 Name,Resets from Character where ctlcode <= 7 order by Resets desc";
$result = mssql_query($query);
echo '<TABLE border=0 cellPadding=0 cellSpacing=0 >
<TBODY>
<TR>
<TD align=left vAlign=top><A
</TR>
<TR>
<TD align=left
vAlign=top>
<TABLE border=0 cellPadding=10 cellSpacing=0
<TBODY>
<TR>
<TD align=middle vAlign=center>
<table height=30 cellspacing=2 cellpadding=4
width=150 border=0>
<tbody
<tr>
<td valign=top align=left width=0 height=0><span class="top5">#</td>
<td valign=top align=center width=0><span class="top5">Name</td>
<td valign=top align=center width=0><span class="top5">Resets</td>
</tr>';
for($i=0;$i < mssql_num_rows($result);++$i)
{
$row = mssql_fetch_row($result);
$rank = $i+1;
echo "<tr><td valign=top align=left><span class='top5'>$rank.</td>
<td valign=top align=center><span class='top5'>$row[0]</td>
<td valign=top align=center><span class='top5'>$row[1]</td>
</tr>";
}
?>
</tbody>
</table>
</TD>
</TR></TBODY></TABLE></TD></TR>
<TR>
</TD></TR></TBODY></TABLE>
that goes inside MODULES/RANKINGS/TOP5
hope i

