I am using the code below i need to check the description must not be same so i have to check the description column for duplicate entry how to do this ?
<?php
session_start();
require 'Admin/includes/connection.php';
$emp_id = $_SESSION['id'];
$task_name = $_POST['task_name'];
$desc = $_POST['desc'];
$hours = $_POST['hours'];
$t = "random";
$a = date('Y-m-d');
$sql = "INSERT INTO project_task (emp_id, task_type, task, description, hours, submit_date) VALUES ('$emp_id', '$t', '$task_name', '$desc', '$hours', '$a')";
if($conn->query($sql) === TRUE){
$data["abc"] = "true";
}
else{
$data["abc"] = "false";
}
header("Content-type: application/json");
echo json_encode($data);
?>