function getstats($db){ include("./config.php"); $tbp=$info['prefix']; $sql='SELECT * FROM accounts ORDER BY username'; $result=mysql_query($sql,$db); //echo "<table border='1'>"; echo "<TABLE class='statsTable'>"; // keeps getting the next row until there are no more to get $ii=0; while ($row=mysql_fetch_row($result)){ echo $row; if ($ii==0){ $name='s1'; } if ($ii==1){ $ii=-1; $name='s2'; } if ($ii==2){ $ii=-2; $name='s3'; } if ($row[1] >= 50) { $str="<img src=star.gif>"; } if ($row[1] >= 100) { $str="<img src=star.gif><img src=star.gif>"; } if ($row[1] >= 150) { $str="<img src=star.gif><img src=star.gif><img src=star.gif>"; } if ($row[1] >= 200) { $str="<img src=IMAGES/pro.gif>"; } //echo 'xD'; echo "<TR class=".$name."> <TD width=200 class='username'>".$row[0]."</TD><TD width=50 align=center class='wins'>".$row[1]." ".$str."</TD><TD width=50 align=center class='losses'>".$row[2]."</TD></TR>"; $ii++; $str=""; } echo "</TABLE>";}