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



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

	$sql = "Insert into diary (id,date,month_name,sub_name,class_name,home_work,user_id) values (null,'$today','$month_name','$sub_name','$class_name','$home_work','$userid')";
mysql_query($sql) or die("Error : " . mysql_error());

	echo "Record Saved Sucessfully";
?>
<a href="student_diary.php"> Back </a>