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.
how do i make post variables obsolete?
Moderator: General Moderators
-
HomerTheDragoon
- Forum Newbie
- Posts: 21
- Joined: Sat Jul 08, 2006 2:10 am
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.
-
HomerTheDragoon
- Forum Newbie
- Posts: 21
- Joined: Sat Jul 08, 2006 2:10 am
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.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
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.
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.
-
HomerTheDragoon
- Forum Newbie
- Posts: 21
- Joined: Sat Jul 08, 2006 2:10 am