Re: Re: change value of session variable?
| From: | Five | Date: | Wed, 21 Jul 2004 23:45:10 +0000 |
| Subject: | Re: Re: change value of session variable? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191451@lists.php.net to get a copy of this message | ||
"Justin Patrin" <papercrane@gmail.com> wrote in message news:432beae0407211623f00795d@mail.gmail.com...
> On Wed, 21 Jul 2004 18:43:12 -0400, Five <primeooze@hotmail.com> wrote:
> >
> > "Justin Patrin" <papercrane@gmail.com> wrote in message
> > news:432beae04072115167f99b40d@mail.gmail.com...
> >
> >
> > > On Wed, 21 Jul 2004 17:50:36 -0400, Five <primeooze@hotmail.com> wrote:
> > > >
> > > > "Five" <primeooze@hotmail.com> wrote in message
> > > > news:20040721214448.52761.qmail@pb1.pair.com...
> > > > > page1.php
> > > > > <?php
> > > > > session_start();
> > > > > echo 'page #1<br>';
> > > > >
> > > > > echo $_SESSION['favcolor'];
> > > > > $_SESSION['favcolor'] = 'green';
> > > > >
> > > > > echo '<br><a href="page2.php">page
> > > > > 2</a>';
> > > > > ?>
> > > > >
> > > > > ----------------------------------------------------
> > > > > page2.php
> > > > > <?php
> > > > > session_start();
> > > > > echo 'page #2<br>';
> > > > >
> > > > > echo $_SESSION['favcolor'];
> > > > > $_SESSION['favcolor'] = 'blue';
> > > > >
> > > > > echo '<br><a href="page1.php">page
> > > > > 1</a>';
> > > > > ?>
> > > >
> > > > Actually the above code doesn't initialize the variable as either green or
> > > > blue. It leaves it blank.
> > > >
> > >
> > > Are you behind any kind of firewall or proxy? Are you blocking
> > > cookies? These could be stopping the session from working period.
> > >
> > > You should have said that it wasn't working period. Your original
> > > e-mail lead me to believe that it could be set initially.
> > >
> > > --
> > > DB_DataObject_FormBuilder - The database at your fingertips
> > > http://pear.php.net/package/DB_DataObject_FormBuilder
> > >
> > > paperCrane --Justin Patrin--
> >
> >
> > The test code at
> >
> > http://ca.php.net/manual/en/function.session-start.php
> >
> > worked so I knew sessions were working to some extent.
> >
>
> Did you use the normal link or the SID link?
>
> --
> DB_DataObject_FormBuilder - The database at your fingertips
> http://pear.php.net/package/DB_DataObject_FormBuilder
>
> paperCrane --Justin Patrin--
Both.