<ul class="nav side-menu">
                  <li><a><i class="fa fa-home"></i> Home <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                      <li><a href="?Home">Dashboard</a></li>
                    </ul>
                  </li>

                  <li class="<?php if(isset($_GET['mod']) && $_GET['mod'] == "coordinating"){ echo"active";} ?>"><a><i class="fa fa-gear"></i> Class Coordinating<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu" <?php if(isset($_GET['mod']) && $_GET['mod'] == "coordinating"){ echo"style='display:block;'";} ?>>
                      <?php

                      $select = $conn->query("SELECT * FROM classes WHERE coordinator = '$id2'");
                            $fetch = $select->fetchAll(PDO::FETCH_OBJ);
                            $count = $select->rowCount();
                            $serial = 1;
                            if ($count > 0) {
                              foreach ($fetch as $value) {
                                $piden = $value->id;
                                $classname = $value->name;
                                $department = $value->department;

                           $select2 = $conn->query("SELECT * FROM department WHERE id = '$department' ");
                                  $fetch2 = $select2->fetchAll(PDO::FETCH_OBJ);
                                  $count2 = $select2->rowCount();
                                  if ($count2 > 0) {
                                    foreach ($fetch2 as $value2) {
                                      $name22 = $value2->name;
                                      $hod = $value2->hod;
                                    }
                                  }  
                      ?>
                      <li class="<?php if (isset($_GET['mod']) && $_GET['mod'] == 'coordinating' && isset($_GET['link']) && $_GET['link'] == $piden){echo "current-page";} ?>"><a href="?mod=coordinating&link=<?php echo $piden ?>"><?php echo "$name22 ($classname)" ?></a></li>
                      <?php

                              }
                            }else{
                          ?>
                        <li class="<?php if (isset($_GET['mod']) && $_GET['mod'] == 'coordinating' && isset($_GET['link']) && $_GET['link'] == $piden){echo "current-page";} ?>"><a href="#">No Class Assigned Yet</a></li>
                          <?php
                            }
                      ?>
                    </ul>
                  </li>
                  <li class="<?php if(isset($_GET['mod']) && $_GET['mod'] == "hlecturer"){ echo"active";} ?>"><a><i class="fa fa-building"></i> Enter A Class<span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu" <?php if(isset($_GET['mod']) && $_GET['mod'] == "hlecturer"){ echo"style='display:block;'";} ?>>
                      <?php

                      $select = $conn->query("SELECT * FROM package WHERE lecturer = '$id2'");
                            $fetch = $select->fetchAll(PDO::FETCH_OBJ);
                            $count = $select->rowCount();
                            $serial = 1;
                            if ($count > 0) {
                              foreach ($fetch as $value) {
                                $piden = $value->id;
                                $level = $value->level;
                                $semester = $value->semester;
                                $course = $value->course;
                                $lecturer = $value->lecturer;

                           $select2 = $conn->query("SELECT * FROM course WHERE id = '$course' LIMIT 1");
                                  $fetch2 = $select2->fetchAll(PDO::FETCH_OBJ);
                                  $count2 = $select2->rowCount();
                                  if ($count2 > 0) {
                                    foreach ($fetch2 as $value2) {
                                      $name2 = $value2->name;
                                      $code2 = $value2->code;
                                    }
                                  } 
                      ?>
                      <li class="<?php if (isset($_GET['mod']) && $_GET['mod'] == 'hlecturer' && isset($_GET['link2']) && $_GET['link2'] == $piden){echo "current-page";} ?>"><a href="?mod=hlecturer&link2=<?php echo $piden ?>"><?php echo "$name2 ($code2)" ?></a></li>
                      <?php

                              }
                            }else{
                          ?>
                        <li class="<?php if (isset($_GET['mod']) && $_GET['mod'] == 'hlecturer' && isset($_GET['link2']) && $_GET['link2'] == $piden){echo "current-page";} ?>"><a href="#">No Class Assigned Yet</a></li>
                          <?php
                            }
                      ?>
                    </ul>
                  </li>
                </ul>