ID: 34862 Updated by: [EMAIL PROTECTED] Reported By: Lhunath at Pandora dot Be -Status: Open +Status: Bogus Bug Type: Session related Operating System: Linux Gentoo PHP Version: 5.0.5 New Comment:
Remove this: if($t) or use if($_GET['t']) instead and it'll work. Previous Comments: ------------------------------------------------------------------------ [2005-10-13 23:12:00] Lhunath at Pandora dot Be Description: ------------ After a variable has been stored in the session file, it's content is available and visible in the file. However, when later the variable's content is altered; the file's content is not. It remains the same initial value. Because of this, the modification is lost. (the session file can be altered in this way: new variables can be added with their value. the session file cannot be altered in this way: existing variables in the file cannot have their value changed) Reproduce code: --------------- Avaria tmp # cat page1.php <?php session_start(); $_SESSION["test"] = "1"; ?> <a href="page2.php?t=2">go to page 2</a> Avaria tmp # cat page2.php <?php session_start(); if($t) $_SESSION["test"] = $_REQUEST["t"]; echo $_REQUEST["t"]; echo $_SESSION["test"]; ?> <a href="page3.php">go to page 3</a> Avaria tmp # cat page3.php <?php session_start(); echo $_SESSION["test"]; ?> Expected result: ---------------- go to page 2 22go to page 3 2 Actual result: -------------- go to page 2 21go to page 3 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34862&edit=1