RE: [PHP-WIN] Setting sessions variables

From: Date: Mon, 10 Mar 2003 05:56:57 +0000
Subject: RE: [PHP-WIN] Setting sessions variables
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-18925@lists.php.net to get a copy of this message
> Let me get this straight - if register_globals is set to off, the best way > to assign a value to a session variable is to use: > > $_SESSION['varname'] = 'value' ; Yes - this will also work fine with register_globals set to On > > This both creates the variable and sets it. And then I can access > this from > any page (that has session_start() at the beginning) with: > > $somevar = $_SESSION['varname'] ; // or whatever > > Is that right? Is it really that simple? Yes > > And is it true that it is best to keep register_globals off > because there is > some security implication? (I've got a feeling my hosting service > insists on > it). Yes - http://www.php.net/manual/en/security.registerglobals.php > > Info gratefully received... > > +a > Steve Voila! Rich

« previous php.windows (#18925) next »