note 20353 deleted from function.session-register by didou
| From: | didou@php.net | Date: | Sun, 18 May 2003 03:56:22 +0000 |
| Subject: | note 20353 deleted from function.session-register by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48399@lists.php.net to get a copy of this message | ||
Note Submitter: some@gamepoint.net
----
$_SESSION should be global in any scope so instead of using
function hello() {
$GLOBALS['mynumber'] = 4;
session_register('mynumber');
}
you could just do
function hello(){
$_SESSION["myvar"] = 4;
}