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



$userid=$_SESSION["userid"];
$today=date("d-m-Y");
$sub_name=$_POST["sub_name"];
$exame_term=$_POST["exame_term"];
$month_name=$_POST["month_name"];
$class_name=$_POST["class_name"];
$std_rollno=$_POST["std_rollno"];
$sess1=$_POST["sess1"];
$sql = "select * from admission where class_name='$class_name' and user_id='$userid'";
   $appl=mysql_query($sql) or die("Error : " . mysql_error());
   $app=mysql_fetch_array($appl);
   if ($app==0)
   {
     echo "Wrong Student Roll No <a href='del_student_result_sheet.php'>Retry</a>";
   }
else
{

$sql3 = "delete from 1st_term where sub_name='$sub_name' and exame_term='$exame_term' and sess1='$sess1' and class_name='$class_name'  and user_id='$userid'";
mysql_query($sql3) or die("Error : " . mysql_error());
	
	header("location:del_student_result_sheet.php");
}	
?>