note 35084 rejected from function.setcookie by didou

From: Date: Tue, 19 Aug 2003 11:38:07 +0000
Subject: note 35084 rejected from function.setcookie by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54651@lists.php.net to get a copy of this message
Note Submitter: php@4tune.net ---- I noticed some inconsistent behaviour (which may just be me doing somthing stupid of course) when using both PHP and javascript on the same cookies. I use a tree-like menu system which remembers the last item selected in a cookie. I want to reset the cookie on login to the default menu option - which means I use setcookie from php to send the default cookie value. However, my cookie value has a SPACE in it and javascript encodes this using %20 and PHP encodes this using +. As a result the javascript cannot read the cookie value sent from PHP. Of course, if someone has a good tip on how to work around this little problem I would be only tooooo happy to hear it...

« previous php.notes (#54651) next »