01.
ob_start();
02.
session_start();
03.
$_SESSION
[
'login'
] =
"cinderella"
;
04.
$_SESSION
[
'password'
] =
"cindy"
;
05.
06.
echo
"Session variable read in page : session_1.php "
;
07.
echo
"<br />"
;
08.
09.
foreach
(
$_SESSION
as
$key
=>
$value
){
10.
echo
"\$_SESSION['$key'] = $value <br />"
;
11.
}
12.
13.
echo
$_SESSION
[
'login'
] ;
14.
echo
"<br />"
;
15.
echo
$_SESSION
[
'password'
] ;
16.
17.
echo
"<br /><a href='session_2.php' target='_blank'> read session variable in the other page</a> "
;