<?php session_start();
include("../connect.php");
////// for logs
	$pes=mysqli_query($con,"select * from head where id='".$_SESSION['cr_hod_id']."'");
	$row=mysqli_fetch_array($pes);
	
	$vac=mysqli_query($con,"select * from department where id='".$row['dep_id']."'");
	$dec=mysqli_fetch_assoc($vac);
	
	mysqli_query($con,"insert into head_logs(name,department,event_details,date) values('".$row['lastname'].' '.$row['othernames']."','".$dec['department']."','Logged Successfully','$date')");
		////// for logs

unset($_SESSION['cr_hod_id']);
header("location:index.php");
?>
