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, (the more i think about my idea, the less i feel its going to work) are greatly appreciated.
Thanks.