T
tomb
Is it possible to use a php cookie in javascript? The one I am setting
in my php code is domain and path specific.
TIA
Tom
in my php code is domain and path specific.
TIA
Tom
Is it possible to use a php cookie in javascript? The one I am setting
in my php code is domain and path specific.
TIA
Tom
Sudrien said:Is it possible to use a php cookie in javascript? The one I am setting
in my php code is domain and path specific.
TIA
Tom
Cookies are generic objects - there is no php-specific cookie. Also,
they are domain specific by default - I don't see why you would need
to set a specic path, but you know your situation.
Cookies are simply name/value pairs that are sent with every page
request. That is *every* request to the specified path and domain, so
you want to keep cookies small as possible.
Compare the following documentation:
http://us.php.net/setcookie
http://www.quirksmode.org/js/cookies.html
As you can see, there is no way to specify domain or path while
reading cookies - only when writing them. The browser decides what
cookie information is relevent depinding on the current URL.
[generic plug for firebug, which also allows you to look at http
headers]
-Sud
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.