if(!isset($start))
{
$start=0;
}
$order="SELECT * from users";
$order2=mysql_query($order);
$d=0;
$f=0;
$g=1;
print "<center>Page: ";
while($order3=mysql_fetch_array($order2))
{
if($f%20==0)
{
print "<A href='field.php?start=$d'>$g</a> ";
$g++;
}
$d=$d+1;
$f++;
}
print "<table class='table'>";
print "<table width=86% align=center bgcolor=#000000 border=1 cellspacing=5>";
print "<td valign='center'>";
print "<tr class='headline'><center>ATTACK!!!</center></tr>";
print "<tr><td>ID#</td><td>Player</td><td>Skill</td><td><font color='#ffd700'>Cash</font></td><td>Army Size</td><td>Honor</td><td>Land</td></tr>";
$topplayers="SELECT * from users order by skillpts DESC Limit $start, 20";
$topplayers2=mysql_query($topplayers) or die("Could not query players");
while($topplayer3=mysql_fetch_array($topplayers2))
{
$topplayer3[playername]=strip_tags($topplayer3[playername]);
$topplayer3[gold]=number_format($topplayer3[gold]);
$topplayer3[skillpts]=number_format($topplayer3[skillpts]);
$topplayer3army=number_format($topplayer3[dffarmy]+$topplayer3[offarmy]);
$topplayer3[honor]=number_format($topplayer3[honor]);
$topplayer3[land]=number_format($topplayer3[land]);
print "<tr><td>$topplayer3[ID]</td><td><A href='target.php?ID=$topplayer3[ID]'>$topplayer3[playername]</a></td><td>$topplayer3[skillpts]</td><td><font color='#ffd700'>$topplayer3[gold]</font></td><td>$topplayer3army</td><td>$topplayer3[honor]</td><td>$topplayer3[land]</td></tr>";
}
print "</table>";
i have this, it works great, but id like to change the column ID into rank and post 1,2,3,4,5 etc.
|