garry27 Posted December 13, 2006 Share Posted December 13, 2006 do session variables get passed onto an external javascript script by default when it is called?thereafter, if you use the javascript script to make an ajax call to a php 'data hander' file will the data script have access to session variables?i have a way i can do it by passing parameters of the session variables via the url and converting the data in and out of js until it reaches the php data file i want but this would be bad practice right? :-\ Link to comment https://forums.phpfreaks.com/topic/30419-ajax-and-sessions/ Share on other sites More sharing options...
fert Posted December 13, 2006 Share Posted December 13, 2006 Sessions are not passed to javascript pages when they're called, but javascript can access the cookie that stores the session id. Link to comment https://forums.phpfreaks.com/topic/30419-ajax-and-sessions/#findComment-140034 Share on other sites More sharing options...
garry27 Posted December 13, 2006 Author Share Posted December 13, 2006 hmm i don't suppose you know of an easy way to do that? Link to comment https://forums.phpfreaks.com/topic/30419-ajax-and-sessions/#findComment-140039 Share on other sites More sharing options...
fert Posted December 13, 2006 Share Posted December 13, 2006 the cookie name is phpsessid, but that's all i can help you with. Link to comment https://forums.phpfreaks.com/topic/30419-ajax-and-sessions/#findComment-140044 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.