Simple cookie question

From: Date: Sat, 09 Aug 2003 23:22:12 +0000
Subject: Simple cookie question
Groups: php.general 
Request: Send a blank email to php-general+get-158999@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? Thanks

« previous php.general (#158999) next »