This is my code,i want to check against empid if cli and callduration both are same and evaluated before it..then show this cli and call duration is already evaluated..if cli is same but duration is different then show start evaluation and also if cli and duration both are different then also show start evaluation.
The problem which i am facing is that my code is only check one statement like empid=1,cli=123,calldurations is 1min &01:01 then its check only 1 min duration and on 01:01 duration print the statement start evaluation..the code should show call is already evaluated..
<?php
$con = mysqli_connect("localhost","root","","usman");
$check = "SELECT COUNT(*) FROM eval WHERE empid = '$_POST[empid]' && cli = '$_POST[cli]' && callduration = '$_POST[callduration]' ";
$result = mysqli_query($con,$check);
$count = mysqli_fetch_array($result);
if(current($count) > 0) {
echo "<tr><td>This call is already evaluated against </td></tr><tr><td> Emp-ID " . $_POST["empid"] . "</td></tr><tr><td>CLI - " . $_POST["cli"] . "</td></tr><tr><td>Call Duration - " . $_POST["callduration"] . "</td></tr>";
}
else
{
echo "<a href='evaluationsheet.php?empid= ". $_GET["empid"] ." && agentname= ". $_GET["agentname"] ." && doj= ". $_GET["doj"] ." && department= ". $_GET["department"] ." && division= ". $_GET["division"] ." && designation= ". $_GET["designation"] ." && image= ". $_GET["image"] ." && cli= ". $_POST["cli"] ." && callduration= ". $_POST["callduration"] ." '> Click Here To Start Evaluation </h1>";
}
?>