Jump to content

form question


cdoyle

Recommended Posts

Hi,

 

I was creating something new for my game, I started to use a form got the page pretty much working and realized something.

 

I have the following form on my page.

 

A user could easily save the source, and open it via a browser on their machine and just change the values of those variables and put the ful path to the script and it would work.

 

How do I prevent this from happening?

 

$cost = $getspy1['level'] * 2000;
            $xspyid = $getspy1['id'];
  echo "<form method=\"post\" action=\"spylog.php?act=confirm\">";
            echo "<input type=\"hidden\" name=\"cost\" value=\"$cost\">";
            echo "<input type=\"hidden\" name=\"spyid\" value=\"$spyid\">";
            echo "<input type=\"submit\" name=\"yes\" value=\"Yes, I am sure!\">";
            echo "</form>";

Link to comment
Share on other sites

force a session to exist before the form is submitted?

 

it really all depends im seeing from a game standard they would need to log in somehow right?

 

if so make a session if session unset the form wont submit

 

Yes the users need to be logged into play.

I'm not sure how do make it so the session needs to be set for the form to submit??

 

Here is my current page, that I thought I had all working right until just now and how easy it is to bypass everything.

 

 

 

[attachment deleted by admin]

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.