Bug #12815 Updated: session does not set value inside function

From: Date: Fri, 17 Aug 2001 16:51:01 +0000
Subject: Bug #12815 Updated: session does not set value inside function
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63547@lists.php.net to get a copy of this message
ID: 12815 Updated by: derick Reported By: jcastro@elnuevodia.com Old Status: Open Status: Bogus Bug Type: Session related Operating System: W2K PHP Version: 4.0.6 New Comment: Read the piece about variabeles and scopes in the manual. This is not a bug. Previous Comments: ------------------------------------------------------------------------ [2001-08-17 12:49:11] jcastro@elnuevodia.com I do not know if this is a bug or if I am doing something very wrong <? session_start(); session_register("sess_uid"); $sess_uid=1; //THIS WORKS function foo(){ $sess_uid=2; // WHY WHY WHY IT DOES ---NOT--- WORK echo "<a href='next.php'>Continue</a>"; } foo(); ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12815&edit=1

« previous php.dev (#63547) next »