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


$userid=$_SESSION["userid"];
$class_name=$_POST["class_name"];
$class_name1=$_POST["class_name1"];
$cls_sec=$_POST["cls_sec"];
$cls_sec1=$_POST["cls_sec1"];
$code=$_POST["code"];
$sql = "SELECT * FROM admission where class_name='$class_name' and user_id='$userid'";
$result=$conn->query($sql);
    
while($row = $result->fetch_assoc())
{
  
	
	
$sql1 = "update admission set class_name='$class_name1',cls_sec='$cls_sec1' where class_name='$class_name' and user_id='$userid'";
$conn->query($sql1);

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