<?php 
  $resulttz4 = mysql_query("SELECT * FROM add_teachers where sr_no='$en' and session='$session' and code='$code'");
 $d_salary4=mysql_result($resulttz4,$i,"d_salary");
 echo $d_salary4;
 
?>/
<?php 
$resulta4 = mysql_query("SELECT * FROM salary where sr_no=$en and JULY='Paid' and session='$session' and code='$code' ORDER BY id ");
$qty4=0;
while ($a_rowa4 = mysql_fetch_row ($resulta4)) {
?>
<?php 
$tfee4=$a_rowa[27];
$qty4 += $tfee4;
}
echo $qty4;
$gtfee4+=$qty4;
$gfees4+=$d_salary4-$qty4;
?>


 