timecatcher Posted August 9, 2008 Share Posted August 9, 2008 Hey, im wanting to stop people using a certain feature for 24hours everytime they press a button, I know its something to do with time() but I just can't seem to figuer it out. Example: User gives rep..Page refreshed...sorry you cannot give rep again till the 24 hours is up. I want to know how to make it display that message till 24 hours is done. Thanks, timecatcher. Link to comment https://forums.phpfreaks.com/topic/118909-how-to-set-a-limit-on-a-certain-action/ Share on other sites More sharing options...
ratcateme Posted August 9, 2008 Share Posted August 9, 2008 make a database a with a record of when they press the button then query the database and get the lat time a user pressed the button and check if it is less than time()+(24*60*60) Scott. Link to comment https://forums.phpfreaks.com/topic/118909-how-to-set-a-limit-on-a-certain-action/#findComment-612298 Share on other sites More sharing options...
timecatcher Posted August 9, 2008 Author Share Posted August 9, 2008 Alright thanks. I will try that and if it works mark this topic solved. Timecatcher. Link to comment https://forums.phpfreaks.com/topic/118909-how-to-set-a-limit-on-a-certain-action/#findComment-612304 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.