note 10051 deleted from function.session-register by jimw
| From: | jimw@php.net | Date: | Tue, 18 Dec 2001 22:22:46 +0000 |
| Subject: | note 10051 deleted from function.session-register by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23255@lists.php.net to get a copy of this message | ||
Something that wasn't obvious to me from the documentation:
You are registering the NAME of the variable, not the variable itself.
Correct:
$name="Bob";
session_register("name");
Wrong:
$name="Bob";
session_register($name);
In the second example, you actually end up registering a variable $Bob, which is probably undefined.