/* if it IS a new assessment, then we get the person from the get[person]: */ if (!isset($_GET['assessment'])) { $person = new Participant(); $person->load_with_participant_id($person_sqlsafe); } /* create a dropdown of the programs/sessions that the person is involved in. */ $get_programs = "SELECT * FROM Participants_Programs\r\n INNER JOIN Session_Names ON Participants_Programs.Program_ID = Session_Names.Session_ID \r\n INNER JOIN Programs ON Session_Names.Program_ID = Programs.Program_ID\r\n WHERE Participants_Programs.Participant_ID = '" . $person->participant_id . "'"; $programs = mysqli_query($cnnEnlace, $get_programs); ?> <h4>Baseline Assessment - <?php echo $person->first_name . " " . $person->last_name; ?> </h4> <?php $person->pre_surveys(); ?> <div style="text-align:center;"><span class="helptext">Program: </span> <select id="program"> <option value="">-------</option> <?php while ($program = mysqli_fetch_array($programs)) { ?> <option value="<?php echo $program['Session_ID']; ?> " <?php echo $person->program_caring == $program['Session_ID'] ? 'selected="selected"' : null; ?> ><?php echo $program['Name'] . " -- " . $program['Session_Name'];