Assuming that you have a process page that stores the submitted choice, have
the process page make the cookie setting and then redirect back to the first
page.

Or better yet, I like it when my original page never leaves and a popup
window is openned to save my choice and then show me the results for that
given vote.

Jim Lucas
----- Original Message -----
From: "Matthew Koh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 09, 2003 4:22 PM
Subject: [PHP] Simple cookie question


> 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
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to