<?php 	

require_once '../../Server/connection.php';


$valid['success'] = array('success' => false, 'messages' => array());

$desId = $_POST['categoriesId'];

if($desId) { 

 $sql = "DELETE FROM designation WHERE des_id = {$desId}";

 if($conn->query($sql) === TRUE) {
 	$valid['success'] = true;
	$valid['messages'] = "Designation is Successfully Deleted";		
 } else {
 	$valid['success'] = false;
 	$valid['messages'] = "Error while removing Designation";
 }
 
 $conn->close();

 echo json_encode($valid);
 
} // /if $_POST