I just got this one to work perfectly for me, finally
I was missing that little bit of knowledge Menno threw in about putting " " around the database name and such
<?php
// Set this to the max number top posters to display
$num = 25;
$rank = 1;
$db=mysql_connect("localhost","YOURDATABASEUSERNAM E","YOURDATABASEPASSWORD");
mysql_select_db("YOURDATABASENAME");
$query = "SELECT * FROM user ORDER BY posts DESC LIMIT $num";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> $rank
<A HREF=\"http://yourdomain/forums/member.php?action=getinfo&userid=$latest_array[userid]\">$latest_array[username]</A> ($latest_array[posts])</FONT><BR>";
$rank = ($rank+1);
}
?>
Made one little change so it will show the number rank instead of just the little character
|