Help to set timeout in a cookie

Discussion in 'JavaScript' started by G-hamsteR, May 8, 2010.

  1. #1
    Hello. I have created a vote-reward system for a website, where users can get rewards by voting.

    The problem is that if they save the url of the last page where they add their account and press on the "Send Reward" button, they can send unlimited rewards.

    That's why I need to add a restriction.

    Is there any way to store their IP or save something into a cookie and only if the user hasn't gotten any rewards within the last 12 hours, he will be able to get one?

    If anyone has time, please help me with the code, because I don't know anything about Javascript.

    Thanks,
    Nick
     
    G-hamsteR, May 8, 2010 IP
  2. G-hamsteR

    G-hamsteR Well-Known Member

    Messages:
    268
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    125
    #2
    ok problem solved. I made it by myself in the end, using a mysql table to store the IP.

    Thanks
     
    G-hamsteR, May 8, 2010 IP