Re: session_start() part III

From: Date: Mon, 13 Aug 2001 15:48:52 +0000
Subject: Re: session_start() part III
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62453@lists.php.net to get a copy of this message
On Mon, Aug 13, 2001 at 05:39:47PM +0200, Aniceto Lopez wrote: > 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 Yes, indeed, you do have to use session_start() on each page you want to use the session-info. And no, you don't need session_destroy() when the user closes the browser. The session is ended automatically then. And btw, how would you detect whether or not someone has closed his browser? Hope this was an answer to your question... -- * R&zE: -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze@datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««

« previous php.general (#62453) next »