<?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"];
$teacher_id=$_POST["teacher_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"];
$home_adress=$_POST["home_adress"];
$phone_no=$_POST["phone_no"];
$cell_no=$_POST["cell_no"];
$monthly_salary=$_POST["monthly_salary"];
$camp=$_POST["camp"];

$sql = "Insert into teacher (id,date,class_name,teacher_id,tech_name,father_name,nic_no,adm_date,dob,master_edu,bach_edu,home_adress,phone_no,cell_no,monthly_salary,user_id,camp,ap,fp)values (null,'$today','$class_name','$teacher_id','$tech_name','$father_name','$nic_no','$adm_date','$dob','$master_edu','$bach_edu','$home_adress'
,'$phone_no','$cell_no','$monthly_salary','$userid','$camp','$ap','$fp')";
mysql_query($sql) or die("Error : " . mysql_error());

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