Re: [PHP] $_SESSION act funny...

2003-07-09 Thread Scott Fletcher
Oh Ha ha...  I see what you meant..  The $_SESSION['test'] had already been
changed from one to two, then three, then four, then back to one.  I didn't
see that coming..  I thought it just start at one and haven't changed at
all.

Thanks!!!

"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm kind of expecting them to change because using the hyperlink to go to
> the next webpage should be treated as such for the same file (webpage
file).
> The reason I'm using the same file is because of the navigation menu with
> all of the menu options that go to the include file...
>
>
> "Mike Migurski" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > >If you go to the next webpage by using the same file (webpage) or a
> > >$_SERVER['PHP_SELF'], the data in the $_SESSION array remain the same,
it
> > >does not change as it should.
> >
> > 
> >
> > >   if ($_SESSION['test'] == "one") { $_SESSION['test'] = "two" };
> > >   if ($_SESSION['test'] == "two") { $_SESSION['test'] = "three" };
> > >   if ($_SESSION['test'] == "three") { $_SESSION['test'] = "four" };
> > >   if ($_SESSION['test'] == "four") { $_SESSION['test'] = "one" };
> >
> > The code above will always result in $_SESSION['test'] == 'one', if you
> > start from any of the four tested values. Is there some other behavior
you
> > are expecting?
> >
> > -
> > michal migurski- contact info and pgp key:
> > sf/cahttp://mike.teczno.com/contact.html
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_SESSION act funny...

2003-07-09 Thread Scott Fletcher
I'm kind of expecting them to change because using the hyperlink to go to
the next webpage should be treated as such for the same file (webpage file).
The reason I'm using the same file is because of the navigation menu with
all of the menu options that go to the include file...


"Mike Migurski" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >If you go to the next webpage by using the same file (webpage) or a
> >$_SERVER['PHP_SELF'], the data in the $_SESSION array remain the same, it
> >does not change as it should.
>
> 
>
> >   if ($_SESSION['test'] == "one") { $_SESSION['test'] = "two" };
> >   if ($_SESSION['test'] == "two") { $_SESSION['test'] = "three" };
> >   if ($_SESSION['test'] == "three") { $_SESSION['test'] = "four" };
> >   if ($_SESSION['test'] == "four") { $_SESSION['test'] = "one" };
>
> The code above will always result in $_SESSION['test'] == 'one', if you
> start from any of the four tested values. Is there some other behavior you
> are expecting?
>
> -
> michal migurski- contact info and pgp key:
> sf/cahttp://mike.teczno.com/contact.html
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_SESSION act funny...

2003-07-09 Thread Mike Migurski
>If you go to the next webpage by using the same file (webpage) or a
>$_SERVER['PHP_SELF'], the data in the $_SESSION array remain the same, it
>does not change as it should.



>   if ($_SESSION['test'] == "one") { $_SESSION['test'] = "two" };
>   if ($_SESSION['test'] == "two") { $_SESSION['test'] = "three" };
>   if ($_SESSION['test'] == "three") { $_SESSION['test'] = "four" };
>   if ($_SESSION['test'] == "four") { $_SESSION['test'] = "one" };

The code above will always result in $_SESSION['test'] == 'one', if you
start from any of the four tested values. Is there some other behavior you
are expecting?

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_SESSION act funny...

2003-07-09 Thread Marek Kilimajer


Scott Fletcher wrote:


   $SID = session_name()."=".session_id();

   if ($_SESSION['test'] == "one") { $_SESSION['test'] = "two" };
$_SESSION['test'] is now 'two', so the next test is true
   if ($_SESSION['test'] == "two") { $_SESSION['test'] = "three" };
$_SESSION['test'] is now 'three', so the next test is true
   if ($_SESSION['test'] == "three") { $_SESSION['test'] = "four" };
$_SESSION['test'] is now 'four', so the next test is true
   if ($_SESSION['test'] == "four") { $_SESSION['test'] = "one" };
$_SESSION['test'] is now 'one' again
  echo "Next Page";
?>
--snip--




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] $_SESSION act funny...

2003-07-09 Thread Scott Fletcher
Noticed that if I assign data to a $_SESSION array and go to the next
webpage then you'll have that new data.  If you go to the next webpage by
using the same file (webpage) or a $_SERVER['PHP_SELF'], the data in the
$_SESSION array remain the same, it does not change as it should.  But if
you do the browser refresh, the data would remain the same which it should
be.

How do I do a workaround to the problem.  I would appreciate any help...

--snip--
< page1.php>>

Next Page";
?>
--snip--



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php