Jump to content

One-Time Button


Trekky1700

Recommended Posts

Hi all,

 

I'm having some trouble with a website I'm making. I want to add a button that users (logged in or not) can click to increase the score of a piece of content. How would I make it so that each person can only push the button once? Would I have to use cookies?

Link to comment
Share on other sites

Something like that would need to be done using cookies if you want to allow guests the ability to press that button only one time.  But there is always the people out there like me, who clear out their cookies daily.  So it wouldn't prevent someone like me, from pressing that button twice.

Link to comment
Share on other sites

Using cookies would not be effective at all. You could just set your browser not to store cookies and press the button as many times as you want.

 

There will be no method that will work perfectly for something like this. If you use cookies they can be cleared. If you base it on ip address they can use a proxy. If you use sessions they can just restart their browser and the session is cleared from the web server, etc.. The best way would be to require registration so that they can click only one time per account, but if you're in a situation where you need to allow guests then I'd say the next best thing is to go off ip address, or perhaps even a combination of the methods mentioned above.

Link to comment
Share on other sites

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.