In this tutorial you will learn how to create your own Highscores for your games, using your own free server / database. Let's go! Here's an example of how the...
Thanks for this super clear tutorial! I like your idea about separating the scores by 'level' or by 'difficulty' (easy, medium, hard). Do you have a tutorial for this? Thanks alot!!!!
First, your scores table must have a new column. So you have: name, score AND level/difficulty.
Then, when submitting score to savescores.php, you already sent name & score. Now you must also add the new variable: level/difficulty.
Last, when getting scores with getscores.php, let's say you will read only scores for level 2 or difficulty easy.
You can send a variable level/difficulty from the game to getscores.php. Edit the getscores.php PHP file to read from the Database only the scores with the requested level/difficulty.