THis may help. This is the page code.
<?php
require('variables.php');
require('variablesdb.php');
include("extention.inc");
include("mainfile.$phpEx");
include("header.$phpEx");
include("example.htm");
?>
<p align="right" class="text"><font size="3">Standings</font></p>
<div align="center">
<center>
<table border="2" cellpadding="1" width="90%" bordercolorlight="#0000FF" bordercolordark="#3366FF">
<tr>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Conference</td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Division</td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Team</td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Player</td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Wins</td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Losses</td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Points</td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text">Percentage</td>
</tr>
<tr>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="left" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
</tr>
<?php
if ($standingsnogames == "yes") {
$where = 0;
}
else {
$where = 1;
}
?>
<?php
$db = mysql_connect($databaseserver, $databaseuser, $databasepass);
mysql_select_db($databasename,$db);
$sortby = "points DESC";
$sql="SELECT * FROM $playerstable WHERE games >= $where ORDER BY $sortby, games ASC";
$result=mysql_query($sql,$db);
$num = mysql_num_rows($result);
$cur = 1;
echo "<ol>";
while ($num >= $cur) {
$row = mysql_fetch_array($result);
$team = $row["team"];
$division = $row["division"];
$conference = $row["conference"];
$name = $row["name"];
$mail = $row["mail"];
$icq = $row["icq"];
$aim = $row["aim"];
$country = $row["country"];
$wins = $row["wins"];
$losses = $row["losses"];
$points = $row["points"];
$games = $row["games"];
if ($games <= 0) {
$percentage = 0.000;
}
else {
$percentage = $wins / $games;
}
$penalties = $row["penalties"];
$pen = $penalties;
if ($pen >= 5) {
$penplayer = "**";
}
if ($pen >= 4) {
$penplayer = "";
}
else if($pen >= 3) {
$penplayer = "";
}
else if($pen >= 2) {
$penplayer = "";
}
else if($pen >= 1) {
$penplayer = "*";
}
else {
$penplayer = "";
}
$streakwins = $row["streakwins"];
$streaklosses = $row["streaklosses"];
if ($streakwins >= $hotcoldnum) {
$color = "#FF0000";
$text = "hot";
}
else if($streaklosses >= $hotcoldnum) {
$color = "#0080FF";
$text = "cold";
}
else {
$color = "#FFFFFF";
$text = "";
}
?>
</ol>
<tr>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"><?php echo "$conference" ?></td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"><?php echo "$division" ?></td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"><?php echo "$team" ?></td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="left" nowrap><p class='text'> <?php echo "<img src='$directory/flags/$country.bmp' align='absmiddle'> <a href='$directory/profile.php?name=$name'>$name</a>"?> <?php echo "$penplayer" ?> <font color="<?php echo "$color" ?>"><?php echo"$text" ?></font> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"><?php echo "$wins" ?></td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"><?php echo "$losses" ?></td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"><?php echo "$points" ?></td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"><?php printf("%.3f", $percentage); ?></td>
</tr>
<?php
$cur++;
}
echo "</ol>";
?>
<tr>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
<td width="20%" bgcolor="<?php echo"$color3" ?>" align="center" nowrap><p class="text"> </td>
</tr>
</table>
</center>
</div>
<p class="text" align="center">
If a player is <font color="#FF0000">hot</font> he won 5 or more games in a row.<br>
If a player is <font color="#0080FF">cold</font> he lost 5 or more games in a row.<br>
Stars (*) indicate the number of penalties for that player.
</p>
<?