MikeDXUNL Posted May 19, 2007 Share Posted May 19, 2007 alright, the php part of my new site is seeing that $_COOKIE['style'] is set to "light" but when i try to get it from javascript. it says it is undefined... here is the code after Cookie is set by PHP var somevar = getCookie('style'); document.write(somevar); which outputs "undefined" instead of "light" any clue, any help is nice thanks in advance! Link to comment https://forums.phpfreaks.com/topic/52159-cookie-style-undefined/ Share on other sites More sharing options...
mainewoods Posted May 20, 2007 Share Posted May 20, 2007 where's your getCookie function? here's w3schools's: http://www.w3schools.com/js/js_cookies.asp Link to comment https://forums.phpfreaks.com/topic/52159-cookie-style-undefined/#findComment-257910 Share on other sites More sharing options...
MikeDXUNL Posted May 21, 2007 Author Share Posted May 21, 2007 works like a charm now. i read up on w3's stuff, .. guess iforgot. thanks for your help Link to comment https://forums.phpfreaks.com/topic/52159-cookie-style-undefined/#findComment-258467 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.