Hi everybody
I have problems with this session.
Hope anybody can help me out!
Lets say I have a page called "a.php" where I have listed the results from a query of mysql.
Then I create a session to gather those results so if I start the session in " b.php", I may see the list of all the results as in a.php.
a.php
<? session_start();
$sessarray=array();
while ($Row = mysql_fetch_array($Result)){
$ID = $Row["ID"];
$Name = $Row["Name"];
$Photo = $Row["Photo"];
$sessarray[$ID]=$Name;
$_SESSION["list"]=$sessarray;
?>
//here I can see the results from my query with no probl. Now if I move to b.php I want to move those results with me.
b.php
<? session_start();
<? echo $_SESSION['list']; ?>
//What I got here as the result of the session is only the word "Array"
and if I change
$SESSION["list"]=$sessarray;
to
$SESSION["list"]=$name;
I only get the last name of all the list
Any idea why this could be happening?
Your help is appreciated
ok