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...
I want to add here my way of separating everything by "GAMES".
Example:
game1 table1/game2 table2
Well first I created folders for each game there in the root, screen (public.html)
gamefolder1,gamefolder2
When I had 2 folders game 1 and game 2 I created the PHP structure normally, then I duplicated the table previously made with the site's tools, opened the login.php file on the site itself and changed the name of the table... :
$db_table = "game1scores"; // Table name
I went into the game folder2 folder and also changed:
$db_table = "game2scores"; // Table name
I entered in getscores.php of each folder and also changed:
// Retrieve data from database
$sql = "SELECT *
FROM game1scores
and the other game 2 obviously... So I tested it with the link below in my case:
yourdomain.000webhostapp.com/game1/savescores.php
then I tested:
yourdomain.000webhostapp.com/game1/getscores.php
for me it worked. So I have a