PHP to Read and Write Scores
Go to your Dashboard and access your File Manager. Here you can upload files, images, sounds, games, etc... This is where the PHP files will be saved (the ones you downloaded attached to this tutorial).
You should click "public_html" directory and upload there your files and folders. To Upload your PHP files, click the "Upload" button and select 'savescores.php' and 'getscores.php' and 'login.php'. You can also upload a zip file and extract it once uploaded.
Edit Your Database Connection Info
Edit the PHP file 'login.php' and update the database part according to the data of your account - like the image shown below. Then save the changes.
(You can also find this data on your Dashboard Tools -> Database Manager)
Reading Scores (testing our PHP)
To read your highscores, we use the file 'getscores.php'.
Type on your internet browser (Google Chrome, Firefox, etc) your free domain + the path to 'getscores.php'.
For example, my URL to read scores is: http://duquekarlgames.000webhostapp.com/getscores.php
If you can see the 'best scores' you previously saved on the database, you have set it up correctly. Congratulations! :)
Writing Scores
You save scores calling the 'savescores.php' file in your website. For example, to save 'John' and '51' points, we will call from Construct 2 the following URL:
https://duquekarlgames.000webhostapp.com/savescores.php?name=john&score=51
Save a new score using the 'savescores.php'.
Then try 'getscores.php' again. If you can see the new score you just saved on the database, you have everything ready!
The server part is ready. Now you only need to set up Construct 2!