Jump to content

[SOLVED] Prevent url changes to cheat the code?


djfox

Recommended Posts

I`m building a mini-game using php where there is a score involved. It will use forms to send the information along. Thus far, forms I`ve seen (and used) show the url as things like game.php?id=8&s=1000

 

Anything I can do to keep people from being able to just type in things in the url bar to cheat the code?

Link to comment
Share on other sites

why don't you use SESSION to store all the information like scores so people cant cheat at all

 

Scott.

 

Because the form url could be changed to cheat the code.

 

One thing that you can do is use the POST method instead of GET. Then the information isn't passed along via the URL.

 

Thanks, I`ll give that a shot.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.