river notes
Tuesday, September 28, 2010
PHP SESSION variables
file1.php
session_register
(
'variable1'
)
;
$variable1
=
'sample value'
;
file2.php
session_start();
echo
$variable1
;
// displays: sample value
echo
$_SESSION[
'variable1'
]
;
// displays: sample value
note:
Be sure that "register_globals = On " in php.ini
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment