Re: Re: Testing if cookies are enabled
| From: | Curt Zirzow | Date: | Tue, 22 Jun 2004 03:57:54 +0000 |
| Subject: | Re: Re: Testing if cookies are enabled | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188793@lists.php.net to get a copy of this message | ||
* Thus wrote Martin Schneider:
>
> But I have seen pages on which it seems they set und check if the cookie
> has been set ON THE SAME PAGE. So I want to know how they do that
> (perhaps with a 302-header or something like that?).
I think you answered you're own question :)
if(! isset($_COOKIE['var']) ) {
setcookie(...);
header('Location: this_same_script.php');
} else {
...
}
while technically not the same page, it just appears that way to
the client.
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!