blueman378 Posted December 18, 2008 Share Posted December 18, 2008 Hi guys, can someone correct me but i thought that sessions are available throughout classes without having to declare them? Link to comment https://forums.phpfreaks.com/topic/137525-solved-accessing-sessions-in-classes/ Share on other sites More sharing options...
gevans Posted December 18, 2008 Share Posted December 18, 2008 Yes they are, but session_start() has to be declared first at the top of your script Link to comment https://forums.phpfreaks.com/topic/137525-solved-accessing-sessions-in-classes/#findComment-718663 Share on other sites More sharing options...
flyhoney Posted December 18, 2008 Share Posted December 18, 2008 $_POST, $_GET, $_SESSION, $_COOKIE etc.. are all "super globals" meaning that they are accessible from anywhere. Link to comment https://forums.phpfreaks.com/topic/137525-solved-accessing-sessions-in-classes/#findComment-718668 Share on other sites More sharing options...
PFMaBiSmAd Posted December 18, 2008 Share Posted December 18, 2008 If you are having a problem with some code, you need to post it to get any specific help with what it is doing. Link to comment https://forums.phpfreaks.com/topic/137525-solved-accessing-sessions-in-classes/#findComment-718670 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.