Hi,

> However I have almost immediately found that while I appear to be able to 
> read cookies at
> any time, I cannot set them when I would like to. Is there any similar trick 
> which will
> work with cookies?

Keep in mind that cookies are set by sending an HTTP header as part of
the response, so until you do that they can't be sent back to you by
the client (and subsequently appear in $_COOKIE).

> (I assume that I can set several cookies using successive calls to 
> setcookie()?)

Sure. Not that I've done it.

> I was also somewhat surprised to find that a cookie is used to implement 
> sessions. Does
> this place any limitations on using both sessions and cookies in the same 
> program?

No (give them a different name though). You can also use sessions by
putting the session ID on the URL, but this, I believe, is called "a
ball ache".

-- 
Richard Heyes
HTML5 canvas graphing: RGraph - http://www.rgraph.net (updated 16th January)
Follow me on Twitter: http://twitter.com/_rgraph
Lots of PHP and Javascript code - http://www.phpguru.org

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

Reply via email to