I need someone to help me creating a ranking page to my game.
I already try to make it but my ranking page just show one user... =/
Here is my actual "classificacao.php" (rank page):
Code: Select all
<?php include "config.php";
session_start();
?>
<link rel="stylesheet" href="iframe.css" type="text/css" media="screen" title="no title" charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<stitle><b><center>Classificação</center></b></stitle><br/>
<?php
$query = "SELECT * FROM utilizadores";
$result = mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$utilizador = mysql_result($result,$i,"utilizador");
$dinheiro = mysql_result($result,$i,"dinheiro");
$i++;
}
echo "<TABLE WIDTH='100%' CELLPADDING='4' CELLSPACING='0'>";
echo " <COL WIDTH=128*>";
echo " <COL WIDTH=128*>";
echo "<TR VALIGN=TOP>";
echo " <TD WIDTH=50% STYLE='border: 1px solid #cccccc; padding: 1px'>";
echo " <center>Nome</center>";
echo "</TD>";
echo " <TD width=50% STYLE='border: 1px solid #cccccc; padding: 1px'>";
echo " <center>Dinheiro</center>";
echo " </TD>";
echo "</TR>";
echo "<TR VALIGN=TOP>";
echo " <TD WIDTH=50% STYLE='border: 1px solid #cccccc; padding: 1px'>";
echo " <center><font family='sans-serif' size='2'>" . $utilizador . "</font></center>";
echo "</TD>";
echo "<TD WIDTH=50% STYLE='border: 1px solid #cccccc; padding: 1px'>";
echo " <center><font family='sans-serif' size='2'>" . $dinheiro . "€</font></center>";
echo " </TD>";
echo "</TR>";
echo "</TABLE>";
?>Regards,
begood
P.S.: I'm portuguese so, sorry for my bad english. :b
