Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/164321-disable-links-for-24-hours-after-click/
Share on other sites

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.