Hi,
I have a php page where I set up some session variables. I then go to another php page (based on some criteria) and there, my session variables disappear!
I have sesson_start() on top of both pages. I used error_log() function to print out the variables and I can see them set in first file and not set in the second file.
(file1.php)
session_start();
...
$_SESSION['uid'] = '123456';
$_SESSION['optionid'] = 'ABCD1234';
error_log("\nbefore going to cust_info.php\nsession[uid]=".$_SESSION['uid'].", session[optionid]=".$_SESSION['optionid'],3,"debug.txt");
if (!isset($_SESSION['posted'])) {
error_log("\nsession[posted] is not set",3,"debug.txt");
echo "<script type=\"text/javascript\">";
echo "window.location.href=\"cust_info.php\";";
echo "</script>";
exit();
}
-----------------------------
(cust_info.php)
session_start();
error_log("\nsession[uid]=".$_SESSION['uid'],3,"debug.doc");
error_log("\nsession[optionid]=".$_SESSION['optionid'],3,"debug.doc");
(this prints blanks for all session variables)
TIA.