<?php 
session_start();
include 'dbc.php';

date_default_timezone_set("Asia/Karachi");

$userid=$_SESSION["userid"];
$today=date("d-m-Y");
$class_name=$_POST["class_name"];

$home_work=$_POST["remarks"];
$picid=$_POST["adm_no"];

$img_name=$picid . "_" . $_FILES["app_file"]["name"];
move_uploaded_file($_FILES["app_file"]["tmp_name"],"app_images3/".$img_name);



	$sql = "Insert into worksheet (id,date,month_name,notice,user_id,app_file) values (null,'$today','$class_name','$home_work','$userid','$img_name')";
$conn->query($sql);

	

header("location:Add_Worksheet.php");

?>
