|
-
May 24th, 2006, 12:43 PM
#1
Thread Starter
Addicted Member
[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'];
}
?>
Changes are not permanent, but change is. {Neil Peart}
-
May 24th, 2006, 12:48 PM
#2
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);
-
May 24th, 2006, 12:50 PM
#3
Thread Starter
Addicted Member
Re: Trouble with Session Vars
That works great! Thanks!
Changes are not permanent, but change is. {Neil Peart}
-
May 24th, 2006, 12:52 PM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|