session_1.php
<?php session_start();
$_SESSION[0]['uid'] = 1;
$_SESSION[0]['uname'] = "n1";
$_SESSION[1]['uid'] = 2;
$_SESSION[1]['uname'] = "n2";
//echo "<pre>"; print_r($_SESSION); echo "</pre>"; die;
header("location:session_2.php");
?>
session_2.php
<?php
session_start();
echo "<pre>";print_r($_SESSION);echo "</pre>";
?>
some how I can’t get values stored in session back. Can anyone tell the reason?
Check the comments at http://dk.php.net/manual/en/reserved.variables.session.php according to them, keys at the root level must be a string.