I´m using PHP (I´m a total newbie with this) to get/set the scores of my games and everything is working perfectly, but it´s pretty easy to hack as I´m making my games with Javascript and the user can check the code and see the jQuery part where I send this info to the server like this
$.post( "http://theurl/addScore.php", { game: 1, name: myPlayer, score: Number(myScore) });
I guess there´s no a perfect solution, but at least I want to know how can I turn that "hack" more difficult to the cheater.
Any way to prevent such an easy insert in the database?