Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
suppose i have a html page where there are 3 buttons particularly named GIFT1,GIFT2,GIFT3..
out of these 2 are same..but one is for huge jackpot ..so whenever user clicks any of the button button it will update the data to the mysql database..
but if users see the source code of the website using developer tools..they can easily identify the unique button ?
because name will be different..
for example-
HTML
<button name="nojackpot">gift</button>
<button name="jackpot">gift</button>
<button name="nojackpot">gift</button>


What I have tried:

actually i have tried a lot to solve this problem like i have changed the button name for particular user but..problem not solved..
sorry for any grammatical mistakes
Posted
Updated 29-Mar-18 1:56am

1 solution

There is no real solution for the HTML page because a user can always inspect the source code. That applies also to JavaScript which might be used for obfuscation.

The only solution that could not be cheated would be doing it on the server side (e.g. by assigning a number according to the pressed button, generating a random number in the range of the number of button, and comparing that with the button number).
 
Share this answer
 
Comments
Maciej Los 29-Mar-18 9:04am    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900