Hello
I have a game that saves scores in a database.
To submit the scores to the database using AJAX, and the hosting of the receive PHP files .
The php checks if the score is sent greater score in the existing database , and if greater , stores , and if less discards .
The game works well , keep the scores are higher every time , but I have a problem.
If I close the game and I open omits the previous score and overwritten by the new being even lower.
It seems that everything resets to write again , but does not respect the saved score above.
For example:
If in the first run i get 25 points, after 75 points, the last value saved in DB is 75 because is greater than 25.
If after i close the game and run again, if the first try i get 25, normally the game should to conserve the 75 points, but in this case ocurrs a error and the 75 points are changed for the 25 points, still if 25 < 75.
What's going on?
This is the PHP
Is writed in spanish.
The parameters U, PM, PS, PR PM, PT, are sent by AJAX in the normal way (with request URL etc....)
example
Request "URL/updatescore.php?U="& IDUser & "&PS=" & Score
Any error in the PHP?
Thanks!