<?php include("parent/callMe.php");


$branch=$_SESSION['branch'];
$class=$_REQUEST['class_id'];

$sql = "SELECT DISTINCT sub.* FROM eduportal_class_subjects as csub, eduportal_subject_config as sub  where csub.branch_id='$branch' and csub.class_id='$class' and csub.subject_id=sub.subject_id";

 ?>
<select name="subject_id" id="subject_id" class="select select_add">

  	<option value="">Choose Subject</option>
<?php

if($_REQUEST['class_id']!='')
{ 

$secondLevel = $m->query($sql);

if($secondLevel[0]>0){
foreach($secondLevel as $secondLevel_val)
{
	
if(is_array($secondLevel_val)){
 ?>
  <option value="<?php echo $secondLevel_val['subject_id']; ?>"><?php echo trim(utf8_encode_all($secondLevel_val['subject'])); ?></option>
  <?php } } } ?>
  
  <?php } ?>
</select>