Re: Help required on cookies

From: Date: Wed, 02 Oct 2002 09:50:49 +0000
Subject: Re: Help required on cookies
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-118568@lists.php.net to get a copy of this message
Balaji Ankem wrote:
But in RFC2109 they mentioned Comment and version are also attributes of the setcookie header. How do you set these attributes using php??
These attributes are optional. Be careful not to confuse the setcookie() PHP function with the Set-Cookie HTTP header. I'm not certain if the setcookie() function itself provides a way to specify some of the less common optional attributes, because I never use it. PHP gives you complete control over cookies with the header() function, and that's what I generally use. You can specify your Set-Cookie header however you want with code like this: header("Set-Cookie: whatever you want");
How this print_r() function works??
Just use it like I mentioned: <pre> <? print_r($_COOKIE); ?> </pre> You'll see. Chris

« previous php.general (#118568) next »