<?php


        include("../../../config/config.php");
        
        
        $campus = $_POST["campus"];
        $institution = $_POST["institution"];
        $userID = $_POST["userID"];
        $usertype = $_POST["usertype"];
        $classID = $_POST["classID"];
        
        
        
        
        
         $prosgetteacherssubject = mysqli_query($link,"SELECT * FROM `courseorsubjectallocation` INNER JOIN `subjectorcourse` ON `courseorsubjectallocation`.`SubjectOrCourseID` =  `subjectorcourse`.`SubjectOrCourseID`
        WHERE `courseorsubjectallocation`.`CourseOrSubjectTeacherUserID`='$userID' AND `courseorsubjectallocation`.`ClassOrDepartmentID`='$classID' GROUP BY subjectorcourse.SubjectOrCourseTitle");
        
         $prosgetteacherssubjectrowcnt = mysqli_num_rows($prosgetteacherssubject);
         $prosgetteacherssubjectrow = mysqli_fetch_assoc($prosgetteacherssubject);
         
         if($prosgetteacherssubjectrowcnt > 0)
         {
           
             
                 do{
                     
                     
                     
                      $SubjectOrCourseTitlenew = $prosgetteacherssubjectrow['SubjectOrCourseTitle'];
                      $SubjectOrCourseID = $prosgetteacherssubjectrow['SubjectOrCourseID'];
                     
                          $prossub_shortend = substr($SubjectOrCourseTitlenew, 0, 6);
                              
                             
                             echo '<option value="'.$SubjectOrCourseID.'">'.$prossub_shortend.'</option>';
                     
                     
                     
                 }while($prosgetteacherssubjectrow = mysqli_fetch_assoc($prosgetteacherssubject));
             

             
             
         }else
         {
             
         }
    

        
        
        
        
            
?>