Re: session_start() part III

From: Date: Mon, 13 Aug 2001 16:05:30 +0000
Subject: Re: session_start() part III
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62456@lists.php.net to get a copy of this message
When you named your session by using session_name(mysession) you renamed your session from PHPSESSID to mysession. You do not need to destroy each session when someone closes the browser out. If you do not, the persons session will be stored in a temp folder on the php server and once in awhile php will go in and clean up that directory for you. So as long as the person comes back to the site using the same sessionid number before php cleans up the directory then you'll have access to the same information. If you want access to the same information all the time, use cookies, the majority of people allow cookies so you're pretty safe. I hope that all made sense :) Rick > I guess Renze, I have to use session_start() in the file where > I want to output data from the session > > All this questions about session are generated because I want > to control the acces to some of the web pages in a site so only > accesible to registered visitors. > > Ok name user and password are stored in a db (mysql), after > password verification sesion is started, temporal storage of some > values (PHPSESSID i.e.) and I guess in the begining of every > restricted page this temporal info shoul be checked to make the > page visible or not but if the visitor closes the browser the sesion is > over, session_destroy is this necessary? > > thanks > > remind me to invite you to have a beer next time you come to barcelona > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#62456) next »