Re: echo SESSION var doesn't work if unset after echo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have two vars doing the same thing. One is echo'd/unset in the <head></head> section and the other echo'd/unset in the footer of the page. No re-direct request is being made.

Ok now check this.   If I use this code:

if(isset($_SESSION["Ecomm"])) {
  echo $_SESSION["Ecomm"];
  unset($_SESSION["Ecomm"]);
}

I can *NOT* see the Ecomm contents in the right-click -> View Page Source. I do see the complete in the "View Generated Source".

Now, If I comment out the unset:

if(isset($_SESSION["Ecomm"])) {
  echo $_SESSION["Ecomm"];
  // unset($_SESSION["Ecomm"]);
}

Then I *CAN* see the Ecomm code in the in the right-click -> View Page Source as well as the "View Generated Source".

I am very humbled right now.....

-eric wood

----- Original Message ----- From: <ceo@xxxxxxxxx>
My theory is that the browser is RE-requesting the data because of the private, must-revalidate.

So it goes like this:

Browser -> GET -> Ecomm: fooie ; unset Ecomm
Browser -> GET -> Ecomm: [not set]


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux