PHPBuilder Discussion Forum:
I understand how cookies are set, but once they are set, how do I read them back from the user in an CGI? How do I refer to them? Is there a corresponding getCookie realated to setCookie? Help... -Bo
I understand how cookies are set, but once they are set, how do I read them back from the user in an CGI? How do I refer to them? Is there a corresponding getCookie realated to setCookie? Help...
Cookie variables are available as normal variables when the script is executed. So if you have set a cookie with the name "country", and the value "Ireland", you can access that with $country or - depending on your php.ini setup - $HTTP_COOKIE_VARS[country].
Simple as that.
a d a m
how to retrieve a cookie in a jsp created in a java servlet?