<?php
session_start();
include 'dbc.php';


$userid=$_SESSION["userid"];
$class_name=$_POST["class_name"];
$code=$_POST["code"];
$sql = "select * from admission where class_name='$class_name' and user_id='$userid'";
$admission=mysql_query($sql) or die("Error : " . mysql_error());
    
while($ppp=mysql_fetch_array($admission))
{
  $mfee=$ppp["annual_fee"];
  $mfeeper=$mfee * $code / 100;
  $tmfee=$mfee + $mfeeper;
	$sql2="update admission set annual_fee='$tmfee' where class_name='$class_name' and user_id='$userid';";
	mysql_query($sql2) or die("Error : " . mysql_error());
	

	 }
	echo "fee increase Sucessfully";
?>
<a href="annual_fee_increasing.php">Back</a>