I want my php code check if person is on leave between two dates and capture an error that the person is already on leave.
I have tried:
$check = "SELECT * FROM `tblleaves` where 'FromDate' BETWEEN $fromdate and $todate and empid = '$session_id' ";