# \[help\] Game counter?

**URL:** <https://forum.kirupa.com/t/help-game-counter/246446>\
**Category:** programming\
**Created:** [December 11, 2007, 8:41am UTC](https://forum.kirupa.com/t/help-game-counter/246446 "2007-12-11T08:41:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjj](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@cjj](https://forum.kirupa.com/u/cjj)\
**Post date:** [December 11, 2007, 8:41am UTC](https://forum.kirupa.com/t/help-game-counter/246446/1 "2007-12-11T08:41:37Z")

</div>

Im not sure how to go about this script.

Basically I have games on my website and users are only allowed to play a specific game 5 times a day. And the next day the counter will start at 0 again.

I created a database table with fields like “users”, “game\_title”, “times\_played” and “date”.

But I’m not sure how to create a script that will determine if the user has played the allocated amount times or if they can still play that day and how do I get the counter to start at 0 again every day?

I would really appreciate any help or advice.

Thanks
