[RESOLVED] Trouble with Session Vars
I've simplified my code for this thread. All I'm trying to do is echo the Session_Vars in a seperate function. Is there anyway to make this work?
test1.php
PHP Code:
<?
session_start();
$HTTP_SESSION_VARS['test'] = "Hello World";
require('test2.php');
test();
?>
test2.php
PHP Code:
<?
function test() {
echo 'HTTP_SESSION_VARS='; echo $HTTP_SESSION_VARS['test'];
}
?>
Re: Trouble with Session Vars
$HTTP_SESSION_VARS is deprecated. Use $_SESSION instead.
If you want to dump all the sessin vars yuo can do in very isliey:
PHP Code:
print_r($_SESSION);
Re: Trouble with Session Vars
That works great! Thanks!
Re: [RESOLVED] Trouble with Session Vars
No porblems :)
print_r() will dump jsut about any type of variable, very useful for debugging.
Srry about all the spellos. Its' 2 degrees and my hadns are falling foff :(