Re: [PHP] base64-encoding in cookies?

2007-02-10 Thread Fletcher Mattox
Jon Anderson writes: > I won't argue that this behavior should probably be documented with > $_COOKIE, but it is documented with it's counterpart, setcookie: "Note > that the value portion of the cookie will automatically be urlencoded > when you send the cookie, and when it is received, it is

Re: [PHP] base64-encoding in cookies?

2007-02-10 Thread Fletcher Mattox
Robert Cummings writes: > But isn't the sender and receiver usually one and the same. I mean your > PHP application is usually what set the cookie in the first place. Then > you receive it in the very same PHP application. No! Not in this case. The first sentence in my original message was:

Re: [PHP] base64-encoding in cookies?

2007-02-09 Thread Fletcher Mattox
Robert Cummings writes: > Dear numnutz, get off your lazy arse and read the doc for yourself: > > http://wp.netscape.com/newsref/std/cookie_spec.html > > It clearly states: > > NAME=VALUE > This string is a sequence of characters excluding semi-colon, comma and > white space. If there is

Re: [PHP] base64-encoding in cookies?

2007-02-08 Thread Fletcher Mattox
Robert Cummings writes: > On Thu, 2007-02-08 at 13:51 -0600, Fletcher Mattox wrote: > > Jon Anderson writes: > > > > > Cookies must be encoded somehow: Because a raw cookie will contain > > > "var=val; expires=time; path=/path/" type stuff, PHP wo

Re: [PHP] base64-encoding in cookies?

2007-02-08 Thread Fletcher Mattox
Jon Anderson writes: > Cookies must be encoded somehow: Because a raw cookie will contain > "var=val; expires=time; path=/path/" type stuff, PHP would *have* to > encode it. I don't mean to be thick, Jon, but I don't understand why it has to be encoded at all. Are you saying that the "path=/p

RE: [PHP] base64-encoding in cookies?

2007-02-08 Thread Fletcher Mattox
ght now, just wanted to point out the urlencode() and rawurlencode() info. > > PHP manual pages here: > > http://us3.php.net/manual/en/function.urlencode.php > http://us2.php.net/manual/en/function.rawurlencode.php > > -TG > > = = = Original message = = = > &g

Re: [PHP] base64-encoding in cookies?

2007-02-07 Thread Fletcher Mattox
I wrote: > A campus web server (not under my control) returns an authentication > string in a cookie named AUTH. The cookie's value is an encrypted, > base64 encoded string. Unfortunately, when I examine $_COOKIE['AUTH'], > it is clear that all of the '+' characters have been replaced with a ' '

[PHP] base64-encoding in cookies?

2007-02-06 Thread Fletcher Mattox
Hi, A campus web server (not under my control) returns an authentication string in a cookie named AUTH. The cookie's value is an encrypted, base64 encoded string. Unfortunately, when I examine $_COOKIE['AUTH'], it is clear that all of the '+' characters have been replaced with a ' ' character i

Re: [PHP] array help

2005-07-14 Thread Fletcher Mattox
Rob writes: > Did you bother to initialize $table as an array() or are you another > lazy slob of a programmer that expects the engine to read your mind > (cluttered as that may be)? Bingo. You seem to have no trouble reading my mind, why can't php? :) Years of perl programming has promoted a

[PHP] array help

2005-07-14 Thread Fletcher Mattox
How does one represent a MySQL table as a two dimensional array using the column names as one of the indices? My naive attempt went something like this: while ($row = mysqli_fetch_assoc($result)) $table[] = $row; but that generated this error; Fatal error: [] ope