<?php 
session_start();
include 'dbc.php';
date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");
$userid=$_SESSION["userid"];
$term=$_POST["term"];
$month_name=$_POST["month_name"];
$sess1=$_POST["sess1"];
$class_name=$_POST["class_name"];



$sql = "delete from datesheet where term='$term' and sess1='$sess1' and class_name='$class_name' and month_name='$month_name' and user_id='$userid'";
$conn->query($sql);

//mysql_query($sql) or die("Error : " . mysql_error());


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