<?php
include('session.php');
include('connection.php');

 $srno=$_POST['srno'];
 $head=$_POST['dept_name1'];
	$head1=$_POST['dept_name11'];
	$info1=$_POST['sub_dept_name1'];
	$dp1=$_POST['dp1'];

mysqli_query($GLOBALS["___mysqli_ston"], "SET NAMES utf8");

//$res="UPDATE `main_dept_pdf` SET `sub_dep_name`='$head',`sub_of_sub_dept`='$info1',`Date`='$dp1',`document1`='',`file_text`='',`Status`='',`LastModified`='' WHERE `department_name`='$head1' ";
//$res="UPDATE `main_dept_pdf` SET `sub_dep_name`='$head',`sub_of_sub_dept`='$info1',`Date`='$dp1',`document1`='',`file_text`='',`Status`='',`LastModified`='' WHERE `department_name`='$head1' ";
$res = "Update main_dept_pdf set department_name = '$head1',sub_dep_name = '$head',sub_of_sub_dept	= '$info1',Date = '$dp1'
							where srno	 = '$srno'";
//echo $res;
mysqli_query($GLOBALS["___mysqli_ston"], $res) or die ("Error Message5" . mysqli_error($GLOBALS["___mysqli_ston"]));

echo"<script>
alert('Updated Successfully');
window.history.back();
</script>";

?>
