amalosoul Posted October 15, 2006 Share Posted October 15, 2006 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! Link to comment https://forums.phpfreaks.com/topic/24025-cookie-with-php-and-javascript/ Share on other sites More sharing options...
printf Posted October 16, 2006 Share Posted October 16, 2006 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! Link to comment https://forums.phpfreaks.com/topic/24025-cookie-with-php-and-javascript/#findComment-109261 Share on other sites More sharing options...
amalosoul Posted October 16, 2006 Author Share Posted October 16, 2006 Thank you! I find out new things every day:)! Link to comment https://forums.phpfreaks.com/topic/24025-cookie-with-php-and-javascript/#findComment-109396 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.