I'm trying pass a value from PHP to cookie, then pick up by javascript. But when using setcookie() function in PHP, data is always encoded by urlencode function. So when picking up by javascript I get encoded value. Function escape and unescape in Java seem not to be same as urlencode and urldecode in PHP so I can't decode it. How to do? please help me. Note that my PHP doesn't support setrawcokie. Thanks for your input.
Why not just set the variable in 1 or the other and pass the reference back and forth as needed?? IE if you want to set it through javascript, set it and modify it through javascript. If you need PHP to read the variable, pass it through the query string.