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:

<? print_r($_COOKIE); ?>

You'll see.


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to