Skip to main content
Fabiano Magno Pechibella
Inspiring
July 4, 2014
Question

Vote For 1 Time Only In Connection satisfaction survey

  • July 4, 2014
  • 3 replies
  • 467 views

Hi CFers,

Anyone know how I can block the user to which the same answer the survey satisfaction only one once?

IP address or COOKIE, what is the better way to do?

P.S. records in the XML file no DB.

Tks,

Fabiano Magno Pechibella

    This topic has been closed for replies.

    3 replies

    BKBK
    Community Expert
    Community Expert
    July 7, 2014

    Cookie has one other advantage over IP. It is more versatile, and more amenable to business logic. For example, it would make sense to write different cookies that tell you whether the user does vote or not.

    As I said elsewhere, if the user-response is that important to you, you should implement authentication. You could then include an ID in the survey to uniquely identify respondents, and convert the XML data into a format suitable for storage in a relational database.

    Legend
    July 4, 2014

    Cookie is better since it is very specific to that user. IP's change all the time on some ISPs.

    Carl Von Stetten
    Legend
    July 7, 2014

    A cookie won't prevent the same user from submitting through multiple browsers from the same machine (e.g. Firefox, Chrome, IE, Safari), or even Chrome and Chrome Incognito (and the like).  IP address may help that a bit, but as @tribule pointed out, IP addresses can change (especially if the person is using a laptop or mobile device and moving between WiFi networks).

    BKBK
    Community Expert
    Community Expert
    July 4, 2014

    Use both IP address and persistent cookie.