Re: accessing session variables

From: Date: Sun, 22 Sep 2002 03:55:50 +0000
Subject: Re: accessing session variables
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-117146@lists.php.net to get a copy of this message
I'm assuming there has got to be a better answer then this, but I found I had the same problem is I was using headers to go to the next page, but when I used the html tags then everything was fine (the SID wasn't getting passed). "Murat Ö." <murat_inf@yahoo.com> wrote in message news:20020921160626.8276.qmail@pb1.pair.com... > i have written > > ini_set("session.name", "SID"); > > before, in page1.php. and i've added it on page2.php before session_start > and it works. > > thanks.. > > > > "Murat Ö." <murat_inf@yahoo.com> wrote in message > news:20020921154225.957.qmail@pb1.pair.com... > > i tried but it didn't work. > > i wrote in page2.php: > > > > <?php > > session_start(); > > echo $_SESSION['isim']; > > ?> > > > > and i was noticed: "Undefined index: isim in ....." > > > > but i have written $_SESSION['isim']='murat' in page1.php > > > > > > > > "Sascha Cunz" <Sascha@GaNoAn.org> wrote in message > > news:200209211739.16376.Sascha@GaNoAn.org... > > Just use the session_start() in the second page and they will be magically > > there where you've put them in the first page. > > > > Sascha > > > > Am Samstag, 21. September 2002 17:01 schrieb Murat Ö.: > > > hi, > > > > > > page1.php creates a session and its variables in it in successfully. > the > > > variables and values are created like > > > $_SESSION['x']='abc' > > > > > > page1.php sends the SID information to page2.php via GET method. how > can > > i > > > access the those variables with SID information in page2.php? > > > > > > thanks > > > > > >

« previous php.general (#117146) next »