Pass information to php file from javascript while restricting user from doing it their self?
Posted
by Sean Madigan
on Stack Overflow
See other posts from Stack Overflow
or by Sean Madigan
Published on 2010-04-06T00:10:08Z
Indexed on
2010/04/06
0:13 UTC
Read the original article
Hit count: 231
I am making a game where the battle system uses javascript to battle. At the end of the battle you either win or lose. If the user wins, I need to update the mysql database with the XP they earned.
The best way I can think of doing this is to have the javascript run an ajax function when the user wins that POSTs something like addxp.php?amount=235, but if I do that then the user can easilly look at the source and see that they can just enter in that page themself to update their xp without battling. But this is the only way I know how to do it?
Help please :-/
© Stack Overflow or respective owner