Re: [PHP] Simple cookie question

2003-08-14 Thread Liam Gibbs
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

Re: [PHP] Simple cookie question

2003-08-14 Thread Chris Shiflett
--- Liam Gibbs [EMAIL PROTECTED] wrote: Does it have to be a cookie? I use the IP address and store that somewhere. Please don't. An IP address is a terrible means of user identification. I would explain why, but I think it would be more informative to search through the archives, as previous

Re: [PHP] Simple cookie question

2003-08-14 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Sun, 10 Aug 2003 at 00:24, lines prefixed by '' were originally written by you. 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

Re: [PHP] Simple cookie question

2003-08-11 Thread Justin French
On Sunday, August 10, 2003, at 01:36 PM, Liam Gibbs wrote: Does it have to be a cookie? I use the IP address and store that somewhere. Liam, please don't advise relying on the IP address for anything. It's been discussed to death on the list before, but in short, the highlights are: 1.

Re: [PHP] Simple cookie question

2003-08-09 Thread Jim Lucas
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

Re: [PHP] Simple cookie question

2003-08-09 Thread Mike Migurski
There are two ways round your problem... 1. Set your cookie right at the top of the script, so as your first line have something like: if(isset($_POST['vote'])){ setcookie(); } 2. Use output buffering, this will make PHP buffer all of your content and not send it till you tell it to (or