Re-arrange the code.

<?php
session_register("$test");
$test = "foo";
?>

Always use session_register first, then follow it with assigning the
variable a value. May not be required in the future, but do it anyway for
clarity.

I don't think you need the global line at all. global is used inside of
functions and classes, not in an "non-nested" piece of code.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Jacky"" <[EMAIL PROTECTED]> wrote in message
004001c0bbb3$bada9080$[EMAIL PROTECTED]">news:004001c0bbb3$bada9080$[EMAIL PROTECTED]...
Hi all
is this syntax correct to work on session in php4?

<?php
global $test;
$test = "foo";
session_register("$test");
?>

but nest page when I call variable $test to echo it, nothing come up? what
did I do wrong?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to