Talk:PHP Programming/sessions
From Wikibooks, the open-content textbooks collection
Under Using Sessions, the first example of registering a session name (second code box) uses
session_register("example");
Shouldn't this be
session_register($example);
I'm new to PHP (which is why I'm reading the guide, of course), but it seems as though keeping it how it's printed would set the session name to "example," not "Test."
(of course it goes on to say that session_register is deprecated, so this suddenly becomes a moot point)
--Sigafoos
A quick visit to http://nl3.php.net/session_register learns us that the parameter for session_register should be a string and not a (as what i suspect you mean) reference to a variable.
so in short: it should be
session_register("example");