Re: How to detect if a cookie is set?
| From: | Paonarong Buachaiyo | Date: | Sat, 22 Mar 2003 03:23:27 +0000 |
| Subject: | Re: How to detect if a cookie is set? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140659@lists.php.net to get a copy of this message | ||
I usuallly use
if ( isset($_COOKIE["Name"]) ) {
.....
}
But if there have any output before this code I use
ob_start();
your output...
if ( isset($_COOKIE["Name"]) ) {
.....
}
ob_end_flush();
"Webmaster Mbt" <webmaster@mbtradingco.com> wrote in message
news:001801c2f002$9e94fc00$0100a8c0@mbtceo...
> Hi I'm trying to make a script that first figures out if a cookie is set,
if
> not,do this, if so, do that.
>
> Can I use:
>
> Isset($HTTP_COOKIE_VARS['nick'] or what should I use?
>
> EJB
>
>