blackcell Posted December 27, 2007 Share Posted December 27, 2007 Can somebody please shed some light on the $_SESSION? I have tried to find something that will explain it better but I am not quite getting it. I know that it is a 'magical' variable like $_SERVER and $_POST. What do you call these 'magic' variables? Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/ Share on other sites More sharing options...
revraz Posted December 27, 2007 Share Posted December 27, 2007 Global Variables. Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/#findComment-424117 Share on other sites More sharing options...
blackcell Posted December 27, 2007 Author Share Posted December 27, 2007 Thanks, I thought they were called globals, now how does the $_SESSION work? Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/#findComment-424128 Share on other sites More sharing options...
revraz Posted December 27, 2007 Share Posted December 27, 2007 http://us3.php.net/session Can also search for Session Tutorials, but the basic concept is setting a variable that can be used in all your pages during that session (until the browser is closed, or inactivity timer hits). Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/#findComment-424129 Share on other sites More sharing options...
blackcell Posted December 27, 2007 Author Share Posted December 27, 2007 So it is basically a variable that does not pass in the address bar but the servers stores it for use in later pages? Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/#findComment-424137 Share on other sites More sharing options...
p2grace Posted December 27, 2007 Share Posted December 27, 2007 It creates a server-side "cookie" that is assigned to the current user that can store data to be used throughout pages on your website. It's a way of passing variables through pages without needing post or get variables. It also allows use within classes without needing to declare it a global. They're safer than cookies because they are stored on the server, not on the client-side. Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/#findComment-424138 Share on other sites More sharing options...
revraz Posted December 27, 2007 Share Posted December 27, 2007 Basically yes, until a certain time then the session info is deleted. So it is basically a variable that does not pass in the address bar but the servers stores it for use in later pages? Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/#findComment-424140 Share on other sites More sharing options...
blackcell Posted December 27, 2007 Author Share Posted December 27, 2007 I see...Thanks Link to comment https://forums.phpfreaks.com/topic/83365-solved-_session-variable/#findComment-424148 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.