Hi Kaoness,
I'll try put it as simple as possible.
probably the easiest way of storing data is in a MySQL database. (see your host about accessing PHPMyAdmin).
Create a table called Scores, and create 2 fields;
1: Score (11 characters, set to interger)
2: Name (256 characters, set to verchar)
Now, every time a user finishes a game you should insert the data into the database with an sql statement.
it would kinda look like this:
$sql = "INSERT INTO Scores (Score,Name)
VALUES ('$Score','$Name')";
take a look at mysql_query at http://www.php.net/mysql_query there is a good definition on how to run a sql query.
You will also need to look at mysql_connect() to connect to the database.
Now to pulling the data out...
just as you did for putting the data in, you need to run a "query" a "select query looks like this...
$sql = "SELECT * FROM Scores ORDER BY Score DESC LIMIT 5"
that means to get everything from the Scores table ordered by The values in Score decending. (higest to lowest)
run mysql_query and put it into a reult
see mysql_fetch_assoc() for help on how to display data from a database.
There are plenty of tutorials on this. Use this information i have given you and try to dig up more.
Good luck