= %s and end_datetime is null order by date_time desc",GetSQLValueString($min_session_datetime,"date")); $get_sessions = mysql_query($sql_get_sessions) or die(mysql_error()); printf("Resume session for subject "); printf("\n"); while($row_get_sessions = mysql_fetch_assoc($get_sessions)) { printf(""); printf("\n",$row_get_sessions['name_last'],$row_get_sessions['name_first'], $row_get_sessions['name_middle'],$row_get_sessions['subject_id'], $row_get_sessions['session_id'],$row_get_sessions['date_time'],$row_get_sessions['experiment_title']); } printf("
SelectLast NameFirst NameMiddle NameSubject IDSession IDDate/TimeExperiment title
"); $form_name = "resume_session_".$row_get_sessions['session_id']; printf("
",$form_name,$_SERVER['PHP_SELF']); printf(""); printf("",$row_get_sessions['session_id']); printf("
%s%s%s%s%d%s%s
"); } else { //session_id was posted require_once('../include/subject_includes.php'); $get_session_info = mysql_select(sprintf("select * from session where session_id=%d",$_POST['session_id'])); $cookie_value = $get_session_info['php_session_id']; //set the cookie to the value corresponding to the session setcookie($QPI_SESSION_NAME,$cookie_value,time()+60*60*24*365*30,'/',"",0); //the cookie has been properly set, but the session variables still haven't been retrieved. //after setting the cookie, another script must be called in order to start the session again //and retrieve all of the session variables. header("Location: ../form_processing/goto_current_form.php"); } ?>