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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to