<?php



include 'connect.php';



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



{



$date=$_GET['date'];

$employee=$_GET['employee'];



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



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



$sql=mysqli_query($conn,"SELECT * from ot_attendance where employee='$employee' and date='$date'") or die(mysqli_error($conn));

$sql1=mysqli_num_rows($sql);



$sel=mysqli_query($conn,"select * from employee where employee='$employee'");

$sel1=mysqli_fetch_assoc($sel);



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



if($sql1>0)

{

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

}

else

{

echo"";

}



echo'</div>';







}







?>