NYCPHP Meetup

NYPHP.org

[nycphp-talk] Problem With Making Cookies

IAlsoAgree at stny.rr.com IAlsoAgree at stny.rr.com
Wed Apr 12 01:33:10 EDT 2006


I have a script that creates a cookie. The text for the cookie is
created like this (I previously used implode and got the exact same
problem I'm about to describe):
$cookiedata = $infoarray[0].'#'.$infoarray[1].'#'.$infoarray[2];

However, when I actually check the data inside the cookie, it's saved
not with pound signs in between the data, but instead with %23. I've
tried using commas, new line characters, hyphen, and all of them return
some kind of % character, usually %2C. Is there something I'm not doing
correctly?

PHP.net says to use implode and a character as the glue, but it doesn't
matter what character I choose for the glue, it always gets changed into
a % character (I've only tried characters that are pratical, letters and
numbers will not be pratical for me as glue) and I can't retrieve the data.

What can I do?

-Joe



More information about the talk mailing list