|
Posted by Barry on 02/07/06 17:10
the simplest, unsecure way of doing it is to use cookies.
when a user votes, check if a cookie exist
if it does, he cannot vote
if it doesn't , he can vote
after the vote, write a cookie
problem is, the user can clear all cookies and vote again.
so, it all depends on how secure you need it to be.
Barry
d wrote:
> "Al Dykes" <adykes@panix.com> wrote in message
> news:ds86ci$8rk$1@panix5.panix.com...
>
>>I've got a voting script that's a little too simple. I can vote as as
>>many times as I can click on the link in my browser.
>>
>>I'n not trying to write an official voting system but I would like to
>>do something as simple as catching the user's IP address and
>>remembering it for a time interval. That has it's own problems, but
>>it would at least prevent double clicks.
>>
>>I can get the IP #, but how do I store it on a server? I can do a flat
>>file
>>or something.
>>
>>Any other suggestions or code are welcome.
>>
>>I'm new to PHP.
>>
>>Thanks.
>>
>
>
> Think how they do it in real life :) Make sure everyone who wants to vote
> has a username/password - simply ask for that before voting, and then you
> know if a user has already voted or not.
>
>
>>
>>
>>--
>>a d y k e s @ p a n i x . c o m
>>
>>Don't blame me. I voted for Gore.
>
>
>
Navigation:
[Reply to this message]
|