murvinlai
murvinlai

Reputation: 50375

Any PHP function to convert invalid characters in Cookie?

I got this: Warning: Cookie values can not contain any of the following ',; \t\r\n\013\014'

is there a function to remove those? and also convert the "+" sign in to %2B ?

Upvotes: 0

Views: 847

Answers (2)

murvinlai
murvinlai

Reputation: 50375

At last, I use base64_encode to do that.

Upvotes: 0

try urlencode($cookie_value);

Upvotes: 1

Related Questions