<?php 
session_start();
include 'dbc.php';
$userid=$_SESSION["userid"];
$id=$_POST["id"];
$cname=$_POST["cname"];
$cname1=$_POST["cname1"];


$sql = "update addclass set 
cname='$cname1' where id='$id'";
$conn->query($sql);
$sql1 = "update items set 
type_name='$cname1' where type_name='$cname'";
$conn->query($sql1);
//mysql_query($sql) or die("Error : " . mysql_error());



header("location:Edit_Del_Type.php");

/*$sql="Select * from agents where userid='$user_id'";
$data=mysql_query($sql) or die ("Error:" . mysql_error());
$userdata=mysql_fetch_array($data);
$email=$userdata["e_mail"];
mail($email . ",info@lalburj.com","Candidate Information","Candidate Data Posted Successfully","Passport No:" . $app_pp_no . " of " . $app_name . "Has been Posted Successfully By:" . $_SESSION["userid"]);*/
?>
