Catfighter High Scores

Insane
[insert_php]
$counter = 1;
$con = mysql_connect(“baldo.ie”,”external”,”BaldoGames”);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}
mysql_select_db(“highscores”, $con);
$result = mysql_query(“SELECT * FROM scores ORDER BY score DESC”);
echo “

“;
echo “

“;
while($row = mysql_fetch_array($result))
{
if($row[‘game’] == ‘Insane’){
echo “

“;
$counter++;}
}
echo “

Rank Name Score
“.$counter.” “.substr($row[‘name’],0,10).” “.$row[‘score’].”

“;
mysql_close($con);

[/insert_php]

Normal
[insert_php]
$counter = 1;
$con = mysql_connect(“baldo.ie”,”external”,”BaldoGames”);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}
mysql_select_db(“highscores”, $con);
$result = mysql_query(“SELECT * FROM scores ORDER BY score DESC”);
echo “

“;
echo “

“;
while($row = mysql_fetch_array($result))
{
if($row[‘game’] == ‘Normal’){
echo “

“;
$counter++;}
}
echo “

Rank Name Score
“.$counter.” “.substr($row[‘name’],0,10).” “.$row[‘score’].”

“;
mysql_close($con);

[/insert_php]

Easy
[insert_php]
$counter = 1;
$con = mysql_connect(“baldo.ie”,”external”,”BaldoGames”);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}
mysql_select_db(“highscores”, $con);
$result = mysql_query(“SELECT * FROM scores ORDER BY score DESC”);
echo “

“;
echo “

“;
while($row = mysql_fetch_array($result))
{
if($row[‘game’] == ‘Easy’){
echo “

“;
$counter++;}
}
echo “

Rank Name Score
“.$counter.” “.substr($row[‘name’],0,10).” “.$row[‘score’].”

“;
mysql_close($con);

[/insert_php]