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


$userid=$_SESSION["userid"];
$class_name=$_POST["class_name"];

$feevalue=$_POST["feevalue"];
$sql = "SELECT * FROM admission where class_name='$class_name' and user_id='$userid'";
$result=$conn->query($sql);
    
while($row = $result->fetch_assoc())
{
  $mfee=$row["mfee"];
  $std_name=$row["std_name"];
    $adm_no=$row["adm_no"];
	
	$tmfee=$mfee + $feevalue;
$sql1 = "update admission set mfee='$tmfee' where std_name='$std_name' and adm_no='$adm_no' and user_id='$userid'";
$conn->query($sql1);

	 }
	header("location:Fee_Increase.php");
?>
