note 35647 added to function.setcookie
| From: | dave at fubra dot com | Date: | Tue, 09 Sep 2003 16:36:51 +0000 |
| Subject: | note 35647 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55900@lists.php.net to get a copy of this message | ||
There are several characters that dont work correctly if part of the cookie name, I in particular
ran into problems using = as part of the cookie name ie/
setcookie('dE4fR=', $foo);
this was as a result of base64_encode() ing a variable to use as the name. The cookie was being set
fine but the = is stored as a little square character in the cookie which prevent proper retreival.
The solution for me was to use md5() instead of base64_encode() but any other method which avoids
the = sign should also solve the problem
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35647
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35647&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35647&report=yes