<?php 
require_once 'config.php';
$error=false;
$errors=array();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
   
  
   $user_id=$_POST['user_id'];
   $content=$_POST['content'];
  
		$createEmployee=mysqli_query($con,"INSERT INTO compliants (user_id,content,date,status) VALUES('".$user_id."','".$content."','".date('Y-m-d H:i:s')."',1)");
	 if($createEmployee){
	     	$errors['success']='Compliant created Sucessfully';
	 }else{
	     $errors['success']='Somthing went wrong !!';
	 }
 	 
	 	echo json_encode($errors);
}