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


$userid=$_SESSION["userid"];
$class_name=$_POST["class_name"];
$class_name1=$_POST["class_name1"];
$code=$_POST["code"];
$sql = "SELECT * FROM admission2";
$result=$conn->query($sql);
    
while($row = $result->fetch_assoc())
{
  $id=$row['id'];
  $std_rollno=$row['std_rollno'];
  $class_name=$row['class_name'];
  $cls_sec=$row['cls_sec'];
$rollno = $class_name . "-" .	$cls_sec . "-" . $std_rollno;
	
$sql1 = "update admission2 set 
std_rollno='$rollno' where id='$id'";
$conn->query($sql1);
	 }
	header("location:maindashboard.php");
?>
