SChaput Posted July 1, 2009 Share Posted July 1, 2009 I have a website in which i want to allow a user to click a certain link that brings them to another page. That page does some mysql queries and sends them back to the original page. Once the original page is loaded the second time, i'd like the link they had clicked to be disabled, for 24 hours. I was thinking this would work by adding a timestamp and an IP address into a database when the query page is loaded. Then on the original page, find the time they are accessing it and compare the two. I'm able to add the IP and NOW() into the mysql database, but am unable to figure out how to compare the two. Any help on my current strategy, or any new ideas, is greatly appreciated. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/164321-disable-links-for-24-hours-after-click/ Share on other sites More sharing options...
.josh Posted July 1, 2009 Share Posted July 1, 2009 so what happens when the user changes or spoofs his IP address and just spends all day clicking away? Quote Link to comment https://forums.phpfreaks.com/topic/164321-disable-links-for-24-hours-after-click/#findComment-866808 Share on other sites More sharing options...
SChaput Posted July 1, 2009 Author Share Posted July 1, 2009 Well, at the current time i wasn't too concerned with people willing to do that, my idea was if they wanted to do it, fine. But the more i think about it, why would i bother with a half- solution when i should just try to code it correctly the first time. I would appreciate any other ideas you have. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/164321-disable-links-for-24-hours-after-click/#findComment-866809 Share on other sites More sharing options...
.josh Posted July 1, 2009 Share Posted July 1, 2009 create a login system. Quote Link to comment https://forums.phpfreaks.com/topic/164321-disable-links-for-24-hours-after-click/#findComment-866811 Share on other sites More sharing options...
SChaput Posted July 1, 2009 Author Share Posted July 1, 2009 A login system is not what I'm looking for, i do not want to require people to log in. If i was to create one, using a database and php then how would i stop someone from clicking the link all day? Quote Link to comment https://forums.phpfreaks.com/topic/164321-disable-links-for-24-hours-after-click/#findComment-866814 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.