Here's one that is really annoying me, as I'm sure that the answer is very simple, but for some reason I can't see it
I have a "Move" button that is of type "submit". On submit, it calls the current page, and it uses some post vars to adjust the game view. The move button is disabled using PHP under certain conditions, such as when the character has run out of energy or an impassable terrain type is directly ahead
However, when the page is reloading, if a player clicks the refresh button quickly enough, the form is re-submitted irrespective of whether they have clicked or not, so they can move again even if exhausted or going into unsuitable terrain.
I hold the current characters details in a PHP object held as a session variable, and the back-end is MySQL. Each character has a unique record which is used to populate the session variable.
Does anyone know how I could stop the refresh button from resubmitting the form if the player has not clicked the Move submit button? The beta testers are having a field day cheating against one another, and I want to stop them asap
Many thanks