Hi I have been working on a highscore block for the Neave arcade games. I saw some other dude allready made that, but he wants money for it, and I am a poor bastard
It sort of works now, see block on this site but I cant translate it propely into a block with marquee scroll etc. like I made here with a not to smart php-script. I simply dont know exactly how to translate content manually into a block, normally I use a automated script for that. Also I don't know very much about PHP.
Btw, I found out that the sql version of the hiscores (there is also an easy textfile version) gave me some problems so I had to adjust the hiscore sql's and php a bit.
Code of the php-script I would like to see functional in a block :
$databaseName = "XXXXXXXXXXXXXX";
$dbconnection = mysql_connect("XXXXXXXXX", "XXXXXXX", "XXXXXXXXX") or die ('I can’t connect to the database.');
mysql_select_db($databaseName,$dbconnection);
$display_max = 5; # Maximum number of scores to display
echo "<b>HISCORES</b>";
echo "$line<br>";
echo "$line<br>";
$table_name ="games_tetris";
$query = sprintf("SELECT name, score FROM $table_name ORDER BY score DESC LIMIT 0, $display_max");
$result = mysql_query($query);
$totalNum = mysql_num_rows($result);
$number = 1;
echo "<b>Tetris</b>";
echo "$line<br>";
while ($row = mysql_fetch_array($result)) {
echo $number;
echo " ";
echo strtoupper($row['name']);
echo " ";
echo nl2br($row['score']);
echo "$line<br>";
$number = $number+1;}
echo "$line<br>";
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum