try changing the lines to this:
PHP Code:
$db_link = @mysql_pconnect("$dbservername", "$dbusername", "$dbpassword");
mysql_select_db ("$dbname", $db_link)
or die("Error connecting to DB");
$query = mysql_query("SELECT posts, username FROM user ORDER BY user.posts DESC, user.username DESC LIMIT 0, 10")
or die("Query Error:$query");
This should tell you where your error is...
Good Luck,