<?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"];
$sub1=$_POST["sub1"];
$sub2=$_POST["sub2"];
$sub3=$_POST["sub3"];
$sub4=$_POST["sub4"];
$sub5=$_POST["sub5"];
$sub6=$_POST["sub6"];
$sub7=$_POST["sub7"];
$sub8=$_POST["sub8"];
$sub9=$_POST["sub9"];
$sub10=$_POST["sub10"];
$ddate1=$_POST['ddate1'] ;
$ddate2=$_POST['ddate2'] ;
$ddate3=$_POST['ddate3'] ;
$ddate4=$_POST['ddate4'] ;
$ddate5=$_POST['ddate5'] ;
$ddate6=$_POST['ddate6'] ;
$ddate7=$_POST['ddate7'] ;
$ddate8=$_POST['ddate8'] ;
$ddate9=$_POST['ddate9'] ;
$ddate10=$_POST['ddate10'] ;
$dday1=$_POST["dday1"];
$dday2=$_POST["dday2"];
$dday3=$_POST["dday3"];
$dday4=$_POST["dday4"];
$dday5=$_POST["dday5"];
$dday6=$_POST["dday6"];
$dday7=$_POST["dday7"];
$dday8=$_POST["dday8"];
$dday9=$_POST["dday9"];
$dday10=$_POST["dday10"];
$dtime1=$_POST["dtime1"];
$dtime2=$_POST["dtime2"];
$dtime3=$_POST["dtime3"];
$dtime4=$_POST["dtime4"];
$dtime5=$_POST["dtime5"];
$dtime6=$_POST["dtime6"];
$dtime7=$_POST["dtime7"];
$dtime8=$_POST["dtime8"];
$dtime9=$_POST["dtime9"];
$dtime10=$_POST["dtime10"];


$sql = "Insert into datesheet (id,sess1,term,month_name,class_name,sub1,sub2,sub3,sub4,sub5,sub6,sub7,sub8,ddate1,ddate2,ddate3,ddate4,ddate5,ddate6,ddate7,ddate8,dday1,dday2,dday3,dday4,dday5,dday6,dday7,dday8,dtime1,dtime2,dtime3,dtime4,dtime5,dtime6,dtime7,dtime8,user_id,sub9,sub10,ddate9,ddate10,dday9,dday10,dtime9,dtime10) values (null,'$sess1','$term','$month_name','$class_name','$sub1','$sub2','$sub3','$sub4','$sub5','$sub6','$sub7','$sub8','$ddate1','$ddate2','$ddate3','$ddate4','$ddate5','$ddate6','$ddate7','$ddate8','$dday1','$dday2','$dday3','$dday4','$dday5','$dday6','$dday7','$dday8','$dtime1','$dtime2','$dtime3','$dtime4','$dtime5','$dtime6','$dtime7','$dtime8','$userid','$sub9','$sub10','$ddate9','$ddate10','$dday9','$dday10','$dtime9','$dtime10')";
$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"]);*/
?>
