echo SESSION var doesn't work if unset after echo

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

 



 I set Ecomm to a little javascript code on the previous page then echo it no the next page.  
session_cache_limiter ('private, must-revalidate');
session_start();

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

..... stuff ...

For some unknown reason echoing this particular session var is now blank and the page's source code proves that it is missing.

Now when I comment out the unset statement, then the crazy thing works.  I see the code in the page's source.

It is as if php is doing this:

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

No kernel, apache, or php updates have happened.   An there's not errors logged.   Truely strange.   Any ideas?


-Eric Wood


[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