<?php



include 'connect.php';



if(isset($_GET['empid']))



{



$date=$_GET['date'];

$employee=mysql_real_escape_string($_GET['employee']);



$date=date('Y-m-d',strtotime($date));



$day=date("l",strtotime($date));

		

		$p=mysql_query("select COUNT(ID) from holiday where date='$date'");

		$p1=mysql_result($p,0);

		



$sql=mysql_query("SELECT count(ID) from attendance where employee='$employee' and date='$date'") or die(mysql_error());

$sql1=mysql_result($sql,0);



$sel=mysql_query("select * from employee where employee='$employee'");

$sel1=mysql_fetch_array($sel);



echo'<div id="war">';



if($sql1>0)

{

echo"Attendance already added for this employee ".$sel1['name']."";

}

else

{

echo"";

}



echo'</div>';







}



?>