Re: Simple cookie question

From: Date: Sun, 10 Aug 2003 03:36:57 +0000
Subject: Re: Simple cookie question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159015@lists.php.net to get a copy of this message
> This may be a stupid question, but I'm trying to set up a system where I can > take a poll from visitors to my website and then set a cookie so that they > can't vote more than once (until they clear their cookies at least). > Problem is, I don't want to put it at the top of my page, because what if > somebody opens up a poll but decides not to vote, then later changes his > mind. The cookie will prevent him from voting. I want the cookie to be set > right after the user clicks the vote button, but every time I do that, I get > an error about headers already being sent. Is there any way around this? Does it have to be a cookie? I use the IP address and store that somewhere.

« previous php.general (#159015) next »