Hi Hammy.

I had the same problem with a game I made. The game is located at:

http://www.queenfans.com/games/ogre_battle/wizard.cgi

I started off using hidden fields in the forms - but people started putting their own values in, and ended up with 1,000,000 gold pieces, loads of strength, etc. *Gives PodMaster a dirty look*

I thought about using cookies to store the data, but like you say, not everyone accepts cookies. So the solution I came up with was to save all the data into a file, and just have the session id in a hidden field, with the session id corresponding to the file. As the data is all in the file where it can't be got at, the values can't be changed. I also added a routine to delete files over 1 month old, so as not to end up with a huge amount of saved data.

Would this approach be any good for you?


In reply to Re: non-cookie session maintenance by katgirl
in thread non-cookie session maintenance by Hammy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.