session help
Posted: Fri Feb 09, 2007 7:33 pm
hi, I have read some post of the session. It seems easy, but, i couldn't get it to work..... please help.
Page 1:
PLEASE USE PHP TAG
Page 2:
page 1 and page 2 are simple http link. the output of page 1 is correct. However, output of page 2 is "now the part number is ". it seems like the data was not passed. did i miss something? thanks!
Page 1:
PLEASE USE PHP TAG
Code: Select all
<? session_start();
$_SESSION["var"] = "PART 0001";
echo "part name is ".$_SESSION["var"];
?>Page 2:
Code: Select all
<? session_start();
echo "now the part number is ".$_SESSION["var"];
?>page 1 and page 2 are simple http link. the output of page 1 is correct. However, output of page 2 is "now the part number is ". it seems like the data was not passed. did i miss something? thanks!