Re: Re: More questions about SESSION use

From: Date: Thu, 05 Feb 2009 19:48:44 +0000
Subject: Re: Re: More questions about SESSION use
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-287729@lists.php.net to get a copy of this message
On Thu, Feb 5, 2009 at 9:16 AM, Terion Miller <webdev.terion@gmail.com>wrote: > On Mon, Feb 2, 2009 at 4:18 PM, Chris <dmagick@gmail.com> wrote: > > > Edmund Hertle wrote: > > > >> 2009/2/1 Terion Miller <webdev.terion@gmail.com> > >> > >> This is how it was originally written: > >>>>> if (empty($_SESSION['AdminLogin']) || > >>>>> $_SESSION['AdminLogin'] != > >>>>> > >>>> true){ > >>> > >>>> header ("Location: LogOut.php"); > >>>>> $_SESSION['user']=$UserName; > >>>>> $_SESSION['AdminID']=$AdminID; <--*I added this one > >>>>> originally the > >>>>> script only used 'user' and 'AdminLogin'* but passed > >>>>> them in urls > >>>>> } > >>>>> > >>>> > >> Those two lines after header() will not be executed. > >> > > > > Yes they will because there is no 'exit'. > > > > Header is just a function call, if you want to stop processing you have > to > > do it yourself. > > > > -- > > Postgresql & php tutorials > > http://www.designmagick.com/ > > > > Is it better to use the session_register() could that be my issue ,although > my sessions are passing from page to page so they are registered? right... > is this part of that loose format that php coders just love and I > hate..because it to me makes learning it hard... > t. FYI session_register is deprecated in PHP 5.3.0 and completely going away in PHP 6.0. Please don't use it. Thanks, V

« previous php.general (#287729) next »