<div class="list-group">
			<ul class="list-group">
				<li class="list-group-item list-group-iteam">
					<div class="row">
						
            
            
                        <div class="col-sm-12">
                        <hr/>
                        </div>
                        <!--<form action="#" name="frmUpdateOlevel" method="POST">
                        -->
                        
                        <div class="col-sm-6">
                            
                        <?php
                        
                            $q = "SELECT `id`, `applicant_id`, `student_id`, `exam_type`, `exam_year`, `exam_month`, `subject1`, `grade1`, `subject2`, 
                                 `grade2`, `subject3`, `grade3`, `subject4`, `grade4`, `subject5`, `grade5`, `subject6`, `grade6`, 
                                 `subject7`, `grade7`, `subject8`, `grade8`, `subject9`, `grade9`, `exam_no`, `type` 
                                 FROM `students_olevel` WHERE student_id = '$user_id' AND type = '1'";
                            $r = mysqli_query($dbc,$q);
                            
                            //if(mysqli_num_rows($r) > 0 )
            //				{
                
                                $rec = mysqli_fetch_array($r,MYSQLI_ASSOC)
                                //while($rec = mysqli_fetch_array($r,MYSQLI_ASSOC))
            //					{
                        
                        ?>
                            <table class="table table-condensed">
                    
                                <tr>
                                    <td width="100%">
                                    <label for="edit-olexam1">Exam Number</label>
                                    <input VALUE="<?php if(!isset($_SESSION['exam_no'])){ echo $rec['exam_no'];}else{ echo $_SESSION['exam_no'];} ?>" type="text" class="form-control" name="exam_no" readonly >
                                    </td>
                                </tr>
                            </table>
                            
                            
                            <table class="table table-condensed">
                                <tr>
                                  <td width="100%">
                                      <label for="edit-olexam1">OLevel Examination Type (1) <span class="ast form-required" title="This field is required.">*</span></label>
                                        <select id="edit-olexam1" name="olexam1" class="form-control" disabled>
                                        <?php if(!isset($_SESSION['olexam1'])){ echo select_exam_type($rec['exam_type']); }else{ echo  select_exam_type($_SESSION['olexam1']);}?>
                                        </select>
                                    </td>
                                  </tr>
                              </table>
                              
                            
                                    <table class="table table-condensed">
                                        <tr>
                                            <td width="50%">
                                                <label for="edit-eyear1">Examination Year <span class="ast" title="This field is required.">*</span></label>
                                         <select id="edit-eyear1" name="eyear1" class="form-control" disabled >
                                            
                                            <option value="0">-- Please Select -- </option>
                                            <?php if(!isset($_SESSION['eyear1'])){ echo year($rec['exam_year']);} else{echo year($_SESSION['eyear1']);} ?>
                                        </select>
                                            <td>
                                            <td width="50%">
                                                <label for="edit-emonth1">Month<span class="ast" title="This field is required.">*</span></label>
                                        <select id="edit-emonth1" name="emonth1" class="form-control" disabled>
                                            <?php if(!isset($_SESSION['emonth1'])){ echo select_exam_month($rec['exam_month']);} else{echo select_exam_month($_SESSION['emonth1']);} ?>
                                        </select>
                                            </td>
                                        </tr>
                                    </table>
                                    
                                    
                                    <table class="table table-condensed">
                                    <tr class="active">
                                                <td width="5%">S/N</td>
                                                <td width="65%">Subjects</td>
                                                <td width="30%">Grades</td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">1</td>
                                                <td width="65%">
                                                    <select name="sub1" class="form-control" disabled >
                                                     <option value="0">-- Please Select -- </option>
                                                     <?php if(!isset($_SESSION['sub1'])){ echo select_subjects($rec['subject1']);} else{ echo select_subjects($_SESSION['sub1']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select  name="grd1" class="form-control" disabled>
                                                        
                                                        
                                                    <?php if(!isset($_SESSION['grd1'])){ echo  select_subject_grade($rec['grade1']);}else{echo  select_subject_grade($_SESSION['grd1']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">2</td>
                                                <td width="65%">
                                                    <select name="sub2" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['sub2'])){ echo select_subjects($rec['subject2']);}else{echo select_subjects($_SESSION['sub2']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd2" class="form-control" disabled >
                                                    
                                                        <?php if(!isset($_SESSION['grd2'])){ echo  select_subject_grade($rec['grade2']);}else{echo select_subject_grade($_SESSION['grd2']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">3</td>
                                                <td width="65%">
                                                    <select name="sub3" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['sub3'])){ echo select_subjects($rec['subject3']);}else{ select_subjects($_SESSION['sub3']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd3" class="form-control" disabled >
                                                        
                                                        <?php if(!isset($_SESSION['grd3'])){ echo  select_subject_grade($rec['grade3']);}else{ echo select_subject_grade($_SESSION['grd3']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">4</td>
                                                <td width="65%">
                                                    <select name="sub4" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['sub4'])){ echo select_subjects($rec['subject4']);}else{echo select_subjects($_SESSION['sub4']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd4" class="form-control" disabled >
                                                        
                                                    <?php if(!isset($_SESSION['grd4'])){ echo  select_subject_grade($rec['grade4']);} else { echo select_subject_grade($_SESSION['grd4']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">5</td>
                                                <td width="65%">
                                                    <select name="sub5" class="form-control" disabled >
                                                      <option value="0">-- Please Select -- </option>
                                                      <?php if(!isset($_SESSION['sub5'])){ echo select_subjects($rec['subject5']);}else{ echo select_subjects($_SESSION['sub5']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd5" class="form-control" disabled >
                                                    
                                                    <?php if(!isset($_SESSION['grd5'])){ echo  select_subject_grade($rec['grade5']);}else{  echo  select_subject_grade($_SESSION['grd5']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">6</td>
                                                <td width="65%">
                                                    <select name="sub6" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['sub6'])){ echo select_subjects($rec['subject6']);}else{ echo select_subjects($_SESSION['sub6']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd6" class="form-control" disabled >
                                                        
                                                    <?php if(!isset($_SESSION['grd6'])){ echo  select_subject_grade($rec['grade6']);} else { echo  select_subject_grade($rec['grd6']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">7</td>
                                                <td width="65%">
                                                    <select name="sub7" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['sub7'])){  echo select_subjects($rec['subject7']); }else{ echo select_subjects($_SESSION['sub7']);}?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd7" class="form-control" disabled >
                                                        
                                                    <?php if(!isset($_SESSION['grd7'])){  echo  select_subject_grade($rec['grade7']);}else{echo  select_subject_grade($_SESSION['grd7']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">8</td>
                                                <td width="65%">
                                                    <select name="sub8" class="form-control" disabled>
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['sub8'])){ echo select_subjects($rec['subject8']);}else{echo select_subjects($_SESSION['sub8']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd8" class="form-control" disabled >
                                                        
                                                        <?php if(!isset($_SESSION['grd8'])){  echo  select_subject_grade($rec['grade8']); }else{ echo  select_subject_grade($rec['grd8']);}?>
                                                    </select>
                                                </td>
                                            </tr>
                                            
                                            <tr class="active">
                                                <td width="5%">9</td>
                                                <td width="65%">
                                                    <select name="sub9" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['sub9'])){  echo select_subjects($rec['subject9']);}else{echo select_subjects($_SESSION['sub9']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="grd9" class="form-control" disabled >
                                                        
                                                        <?php if(!isset($_SESSION['grd9'])){  echo  select_subject_grade($rec['grade9']);}else{echo  select_subject_grade($_SESSION['grd9']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                        
                             <?php 
                                 // }//end of while
                             // }//end of if 
                                ?>
                              
                                        
                                
                                    </div>
                                    
                                    
                                    
                                    
                                        
                                    <div class="col-sm-6">
                       <?php
                        
                            $q = "SELECT `id`, `applicant_id`, `student_id`, `exam_type`, `exam_year`, `exam_month`, `subject1`, `grade1`, `subject2`, 
                                 `grade2`, `subject3`, `grade3`, `subject4`, `grade4`, `subject5`, `grade5`, `subject6`, `grade6`, 
                                 `subject7`, `grade7`, `subject8`, `grade8`, `subject9`, `grade9`, `exam_no`, `type` 
                                 FROM `students_olevel` WHERE student_id = '$user_id' AND type = '2'";
                            $r = mysqli_query($dbc,$q);
                            
                            //if(mysqli_num_rows($r) > 0 )
            //				{
                
                                $rec2 = mysqli_fetch_array($r,MYSQLI_ASSOC)
                                //while($rec2 = mysqli_fetch_array($r,MYSQLI_ASSOC))
            //					{
                        
                        ?>
                            <table class="table table-condensed">
                    
                                <tr>
                                    <td width="100%">
                                    <label for="edit-olexam2">Exam Number</label>
                                    <input VALUE="<?php echo $rec2['exam_no']; ?>" type="text" class="form-control" name="exam_no2" readonly>
                                    </td>
                                </tr>
                            </table>
                            
                            
                            <table class="table table-condensed">
                                <tr>
                                      <td width="100%">
                                          <label for="edit-olexam2">OLevel Examination Type (2) <span class="form-required ast" title="This field is required.">*</span></label>
                                            <select id="edit-olexam1" name="olexam2" class="form-control" disabled>
                                               <?php echo select_exam_type($rec2['exam_type']); ?>
                                            </select>
                                        </td>
                                  </tr>
                              </table>
                              
                            
                                    <table class="table table-condensed">
                                        <tr>
                                            <td width="50%">
                                                <label for="edit-eyear2">Examination Year <span class="ast" title="This field is required.">*</span></label>
                                         <select id="edit-eyear2" name="eyear2" class="form-control" disabled >
                                            
                                            <option value="0">-- Please Select -- </option>
                                            <?php echo year($rec2['exam_year']); ?>
                                        </select>
                                            <td>
                                            <td width="50%">
                                                <label for="edit-emonth2">Month<span class="ast" title="This field is required.">*</span></label>
                                        <select id="edit-emonth2" name="emonth2" class="form-control" disabled>
                                            <?php if(!isset($_SESSION['emonth2'])){ echo select_exam_month($rec2['exam_month']);} else{echo select_exam_month($_SESSION['emonth2']);} ?>
                                        </select>
                                            </td>
                                        </tr>
                                    </table>
                                    
                                    
                                     <table class="table table-condensed">
                                    <tr class="active">
                                                <td width="5%">S/N</td>
                                                <td width="65%">Subject</td>
                                                <td width="30%">Grade</td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">1</td>
                                                <td width="65%">
                                                    <select name="s_sub1" class="form-control" disabled>
                                                        <option value="0">-- Please Select -- </option>
                                                     <?php if(!isset($_SESSION['s_sub1'])){ echo select_subjects($rec2['subject1']);} else{ echo select_subjects($_SESSION['s_sub1']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select  name="s_grd1" class="form-control" disabled>
                                                        
                                                        
                                                    <?php if(!isset($_SESSION['s_grd1'])){ echo  select_subject_grade($rec2['grade1']);}else{echo  select_subject_grade($_SESSION['s_grd1']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">2</td>
                                                <td width="65%">
                                                    <select name="s_sub2" class="form-control" disabled>
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['s_sub2'])){ echo select_subjects($rec2['subject2']);}else{echo select_subjects($_SESSION['s_sub2']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd2" class="form-control" disabled>
                                                    
                                                        <?php if(!isset($_SESSION['s_grd2'])){ echo  select_subject_grade($rec2['grade2']);}else{echo select_subject_grade($_SESSION['s_grd2']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">3</td>
                                                <td width="65%">
                                                    <select name="s_sub3" class="form-control" disabled>
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['s_sub3'])){ echo select_subjects($rec2['subject3']);}else{ echo select_subjects($_SESSION['s_sub3']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd3" class="form-control" disabled >
                                                        
                                                        <?php if(!isset($_SESSION['s_grd3'])){ echo  select_subject_grade($rec2['grade3']);}else{ echo select_subject_grade($_SESSION['s_grd3']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">4</td>
                                                <td width="65%">
                                                    <select name="s_sub4" class="form-control" disabled>
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['s_sub4'])){ echo select_subjects($rec2['subject4']);}else{echo select_subjects($_SESSION['s_sub4']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd4" class="form-control" disabled>
                                                        
                                                    <?php if(!isset($_SESSION['s_grd4'])){ echo  select_subject_grade($rec2['grade4']);} else { echo select_subject_grade($_SESSION['s_grd4']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">5</td>
                                                <td width="65%">
                                                    <select name="s_sub5" class="form-control" disabled >
                                                         <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['s_sub5'])){ echo select_subjects($rec2['subject5']);}else{ echo select_subjects($_SESSION['s_sub5']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd5" class="form-control" disabled>
                                                    
                                                    <?php if(!isset($_SESSION['s_grd5'])){ echo  select_subject_grade($rec2['grade5']);}else{  echo  select_subject_grade($_SESSION['s_grd5']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">6</td>
                                                <td width="65%">
                                                    <select name="s_sub6" class="form-control" disabled>
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['s_sub6'])){ echo select_subjects($rec2['subject6']);}else{ echo select_subjects($_SESSION['s_sub6']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd6" class="form-control"  disabled>
                                                        
                                                    <?php if(!isset($_SESSION['s_grd6'])){ echo  select_subject_grade($rec2['grade6']);} else { echo  select_subject_grade($_SESSION['s_grd6']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">7</td>
                                                <td width="65%">
                                                    <select name="s_sub7" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['s_sub7'])){  echo select_subjects($rec2['subject7']); }else{ echo select_subjects($_SESSION['s_sub7']);}?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd7" class="form-control" disabled >
                                                        
                                                    <?php if(!isset($_SESSION['s_grd7'])){  echo  select_subject_grade($rec2['grade7']);}else{echo  select_subject_grade($_SESSION['s_grd7']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr class="active">
                                                <td width="5%">8</td>
                                                <td width="65%">
                                                    <select name="s_sub8" class="form-control" disabled >
                                                    <option value="0">-- Please Select -- </option>
                                                    <?php if(!isset($_SESSION['s_sub8'])){ echo select_subjects($rec2['subject8']);}else{echo select_subjects($_SESSION['s_sub8']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd8" class="form-control" disabled >
                                                        
                                                        <?php if(!isset($_SESSION['s_grd8'])){  echo  select_subject_grade($rec2['grade8']); }else{ echo  select_subject_grade($_SESSION['s_grd8']);}?>
                                                    </select>
                                                </td>
                                            </tr>
                                            
                                            <tr class="active">
                                                <td width="5%">9</td>
                                                <td width="65%">
                                                    <select name="s_sub9" class="form-control" disabled>
                                                     <option value="0">-- Please Select -- </option>
                                                  
                                                    <?php if(!isset($_SESSION['s_sub9'])){  echo select_subjects($rec2['subject9']);}else{echo select_subjects($_SESSION['s_sub9']);} ?>
                                                    </select>
                                                </td>
                                                <td width="30%">
                                                    <select name="s_grd9" class="form-control" disabled >
                                                        
                                                        <?php if(!isset($_SESSION['s_grd9'])){  echo  select_subject_grade($rec2['grade9']);}else{echo  select_subject_grade($_SESSION['s_grd9']);} ?>
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                        
                             <?php 
                                // }//end of while
                              //}//end of if 
                                ?>
                              
                                        </div>			<!--</form>-->
			
           				  </div><!-- /.row -->
					</div>
				</li>
			</ul>
</div>