Bug #12815: session does not set value inside function
| From: | jcastro at elnuevodia dot com | Date: | Fri, 17 Aug 2001 16:49:11 +0000 |
| Subject: | Bug #12815: session does not set value inside function | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-63545@lists.php.net to get a copy of this message | ||
From: jcastro@elnuevodia.com
Operating system: W2K
PHP version: 4.0.6
PHP Bug Type: Session related
Bug description: session does not set value inside function
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 bug report at: http://bugs.php.net/?id=12815&edit=1