I don't want my users to be able to change the ('+res.id+') and ('+res.level') using inspect element because if they do it changes the outcome of the submit button.
For example '+res.id+' is = 2 and 2 is equal to a firedragon, but if the person uses inspect element they can change that 2 to a 1 and 1 is equal to a lightningdragon. Then when they click battle the firedragon was changed to a lightningdragon. Basically they can battle whoever/whatever they want.
Is there anyway way to prevent people from changing those variables OR check if the variable was changed so I can send the user an error message?
html += '<form name="input" action="ingame.php?page=attack/travel/startbattle" enctype="multipart/form-data" method="post">';
html += '<input type="hidden" id="goid" name="goid" value="'+res.id+'">';
html += '<input type="hidden" id="level" name="level" value="'+res.level+'">';
html += ' <input type="submit" value="Battle!" class="button"/>';
html += '</form>';