bgsomers Posted July 29, 2006 Share Posted July 29, 2006 I run the following [code]session_start(); # create session to be resumed in file input.php$_SESSION["StartTime"] = time();# if(isset($_SESSION["StartTime"])) { echo 's'; }[/code]and the display alway contains a small 's', indicating that $_SESSION["StartTime"] has been stored.Later in the processing, I have [code]session_start(); # resume session created in file new.html$mintime = 15;$check = time();$duration = ($check - $_SESSION["StartTime"]);$admin01 = 'duration was: '.$duration;$admin02 = 'check time was: '.$check;$admin03 = 'start time if retrieved: '.$_SESSION;if (!empty($_SESSION)) { $admin04 = print_r($_SESSION,true); }else { $admin04 = 'the session variable $_SESSION has not been retrieved '; }[/code]Less than half the time, this leads to- duration was: 2- check time was: 1154188904- start time if retrieved: Array- Array( [StartTime] => 1154188902)indicating that $_SESSION["StartTime"] has been retrieved, and all is well.But more than half of the time, it leads to - duration was: 1154186069- check time was: 1154186069- start time if retrieved: Array- the session variable $_SESSION has not been retrievedindicating that the array element $_SESSION["StartTime"] was empty.How can this data be passed part of the time, but not all of the time?Bruce Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.