<?php
// Include the database connection file
session_start();
include "menuadmin.php";
include 'config.php';


if (isset($_POST['update'])) 
{
	$kodeuser=addslashes($_POST['ikduser']);
    $nama=addslashes($_POST['inama']);
	
	
	

		// Update the database table
		$result = mysqli_query($mysqli, "UPDATE `kelas` SET `nama`='$nama' WHERE `Idkelas`='$kodeuser'");
		
		// Display success message
		echo "<p><font color='green'>Data updated successfully!</p>";
		echo "<br> ";
		header("location:kelas.php?ed=1");
		
	}
