tubs2222 Posted March 14, 2006 Share Posted March 14, 2006 Hey guys,I've been faced with a problem on my site with a little count down script:[a href=\"http://nationwar.awardspace.com/code.txt\" target=\"_blank\"]Code[/a]btw i'm making a lottery gameWhen the $ml is equal to zero the person can bid again, the code works and everytime, but the time resets only if the user views the page. For example if the user bids then comes baq the next day it will tell them if they won or not eventhough the bidding duration is only 180 secs. But i'm trying to make the counter go on even though the user does not access the pageI hope i'm not being confusing, if i am please ask me any question regarding the program.Thank you Quote Link to comment Share on other sites More sharing options...
keeB Posted March 14, 2006 Share Posted March 14, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] But i'm trying to make the counter go on even though the user does not access the page [/quote]Store their last accessed time in a database.. and the time at which they can vote again, and every time they access the 'Bid' page, get their data and make sure 180 seconds haven't passed..You basically have the general idea in the code, you just need to store it for later retrieval. Quote Link to comment Share on other sites More sharing options...
tubs2222 Posted March 14, 2006 Author Share Posted March 14, 2006 [!--quoteo(post=355066:date=Mar 14 2006, 04:33 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 14 2006, 04:33 PM) [snapback]355066[/snapback][/div][div class=\'quotemain\'][!--quotec--]Store their last accessed time in a database.. and the time at which they can vote again, and every time they access the 'Bid' page, get their data and make sure 180 seconds haven't passed..You basically have the general idea in the code, you just need to store it for later retrieval.[/quote]Yes, I have already done that. I'll try to explain it better, ok for example lets take this case as an example. The countdown starts when you have placed a bet, this is the 1st round. You can not place a bet for another 180 secs. But the problem is that the person will visit the page again in another 1000 secs. Even though they came backk after 1000 secs the round finishes and the second round begins.What i'm trying to do is if the person doesn't come baq after 180 secs the 2nd round being then the 3rd then the 4h and so on even thought the user is not present. Quote Link to comment Share on other sites More sharing options...
keeB Posted March 14, 2006 Share Posted March 14, 2006 You're not making much sense Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.