On 4/26/05, AndreaD <[EMAIL PROTECTED]> wrote:
> I need two bits of info...
> 
> (i) Are there ANY cookies set?
> 
> (ii) How many cookies are set?
> 
> how do I find this information out?
> 
> AD
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

you can access cookies by using the superglobal variable (as an array) $_COOKIE.

if ( isset($_COOKIE['cookiename']) )
{
   // do some stuff. cookie with cookiename is set.
}

i don't know the best method to check how many cookies are set but i
guess you count the array $_COOKIE.

$number = count($_COOKIE)

hope this helps.

Ken

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

Reply via email to