ahh.. I just copied what I had to connect.. my bad Will try it again!
Here is what I tried, got error on line 22 this time (which is the marked text)
Fatal error: Call to a member function fetch_assoc() on a non-object in /customers/a/3/f/loff-production.com/httpd.www/avoidthecars/highscore.php on line 22
<html>
<head>
<link href="styleofc.css" rel="stylesheet" type="text/css">
</head>
<?php
$mysqli = new mysqli("x","x","x");
$sql="SELECT
@rownum := @rownum + 1 AS Rank
, name as Name
, score as Score
, id as ID
FROM high_scores_avoidthecars
JOIN (SELECT @rownum := 0) as initialise
ORDER BY score DESC, id
LIMIT 50";
$res = $mysqli->query($sql);
$row = $res->fetch_assoc(); <-------------- LINE 22! <-------------------------------
echo "<table border='1'><tr><th>" . join('</th><th>', array_keys($row)) . "</th></tr>\n";
do {
echo "<tr><td>" . join('</td><td>', $row) . "</td></tr>\n";
} while ($row = $res->fetch_assoc()) ;
echo "</table>\n" ;
$res->free();
?>
</html>