Jump to content

Archived

This topic is now archived and is closed to further replies.

amalosoul

Cookie with PHP and Javascript

Recommended Posts

I have created a cookie with $_SESSION[var]=variable; can javascript access this cookie called var?
If yes how can this be done?

Thank you in anticipation!

Share this post


Link to post
Share on other sites
A session variable is not a cookie, a cookie variable is not session variable. Other than that, any cookie set with the PHP(s) function setcookie() can be read by javascript as long as the cookie flag [b]httponly[/b] is not set in the cookie! If it is set [b]httponly[/b], then javascript can not access the cookie variable=value!


me!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.