<?php 
  $resulttz5 = mysql_query("SELECT * FROM add_teachers where sr_no='$en' and session='$session' and code='$code'");
 $d_salary5=mysql_result($resulttz5,$i,"d_salary");
 echo $d_salary5;
 
?>/
<?php 
$resulta5 = mysql_query("SELECT * FROM salary where sr_no=$en and AUGUST='Paid' and session='$session' and code='$code' ORDER BY id ");
$qty5=0;
while ($a_rowa5 = mysql_fetch_row ($resulta5)) {
?>
<?php 
$tfee5=$a_rowa[27];
$qty5 += $tfee5;
}
echo $qty5;
$gtfee5+=$qty5;
$gfees5+=$d_salary5-$qty5;
?>


 