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


$userid=$_SESSION["userid"];
$today=date("d-m-Y");
$class_name=$_POST["class_name"];
$ap=$_POST["ap"];
$fp=$_POST["fp"];
$month=$_POST["month"];
$sess1=$_POST["sess1"];
$teacher_id=$_POST["teacher_id"];
$id=$_POST["id"];
$tech_name=$_POST["tech_name"];
$father_name=$_POST["father_name"];
$nic_no=$_POST["nic_no"];
$adm_date=$_POST["adm_date"];
$dob=$_POST["dob"];
$master_edu=$_POST["master_edu"];
$bach_edu=$_POST["bach_edu"];
$fa_edu=$_POST["fa_edu"];
$home_adress=$_POST["home_adress"];
$bcode=$_POST["bcode"];

$cell_no=$_POST["cell_no"];
$monthly_salary=$_POST["monthly_salary"];
$camp=$_POST["camp"];
$idate=$_POST["idate"];
$class_name=$_POST["class_name"];
$mat=$_POST["mat"];
$computer=$_POST["computer"];
$marital=$_POST["marital"];

$sql = "update teacher set 
class_name='$class_name',teacher_id='$teacher_id', tech_name='$tech_name' , father_name='$father_name', nic_no='$nic_no', adm_date='$adm_date', dob='$dob', master_edu='$master_edu', bach_edu='$bach_edu', home_adress='$home_adress', cell_no='$cell_no', monthly_salary='$monthly_salary', camp='$camp', ap='$ap', fp='$fp', fa_edu='$fa_edu', mat='$mat', computer='$computer', marital='$marital', fa_edu='$fa_edu', idate='$idate', bcode='$bcode' where id='$id'";
$conn->query($sql);

header("location:Edit_Del_Teacher.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"]);*/
?>
