1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What is the best way to secure against double rating a post?

Discussion in 'Programming' started by Stefany93, Aug 21, 2012.

  1. #1
    Hello friends,

    I have recently written a rating system, howerver I want to restrict a user to rate a post multiple times.
    I tried storing the their IP in the DB but the problem arose when I found out that they could only vote on one post for the entire blog and that wasn't pretty.

    So could you please tell me a better way to create a state for the user to vote only one time per a post?

    Thank you very much!

    Best Regards
    Stefany
     
    Stefany93, Aug 21, 2012 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #2
    So store their IP and a unique ID for the post they rated, instead of just the IP.
     
    deathshadow, Aug 21, 2012 IP
  3. Stefany93

    Stefany93 Greenhorn

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Thank you! Btw, I also hate JQuery! :D
     
    Stefany93, Aug 22, 2012 IP