Page 1 of 1

how do i make post variables obsolete?

Posted: Sun Jul 09, 2006 7:27 pm
by HomerTheDragoon
How do i acomplish this?
so lets say i have stats on a mysql server database. And when u get sent to a certain page with a certain post variable set to something, your stats go up. How do i make it so you wouldnt be able to keep refreshing to boost your stats?

Thanks.

Posted: Sun Jul 09, 2006 7:35 pm
by bdlang
Good point. What is the basis to give the user stat points in the first place? Triggered by a specific task the user did or by an event? I'd wager you could provide some logical constraint based on this 'event' that would only allow the user stat points when and if the event was complete, not simply by linking to another script. Have the script check a table `Events` and see if the user completed the task or not. If so, don't allow any more stat points.

Posted: Sun Jul 09, 2006 8:10 pm
by feyd
unique, one-time use transactions.

Posted: Sun Jul 09, 2006 9:13 pm
by HomerTheDragoon
I dont want them to be one time used, but just so you can not abuse it. Since you will be able to repeat these tasks over and over. Therefor increaseing your stats, however I want it so the players have to work for it. Im going to be using flash for the tasks. and after you complete it, it does so and so.

Posted: Sun Jul 09, 2006 10:02 pm
by RobertGonzalez
I use cookies for stats for pages. I know this is not the same exact thing, but I use a cookie to check to see if the current page loaded is the same as the last page loaded so I know if I need to up my page counter or not. I am sure you could use some sort of cookie/session mechanism to manage stat updating.

Posted: Sun Jul 09, 2006 10:30 pm
by feyd
Unique, one-time use transactions doesn't mean you can't repeat an action, but it does make each transactopn taken only possible once.

How they work is you create and record a transaction ID into the database. This record would hold details of what action to take. Once the transaction has been touched, you mark the record as used or delete the record. The transaction should be linked to the user so another user cannot take the transaction for themselves and only known transactions should be allowed to be executed. I would also make the transactions self-terminate after a period of time from their creation.

Posted: Sun Jul 09, 2006 10:40 pm
by HomerTheDragoon
thats a pretty good idea :P.

thanks.