<?php 	

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


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

$sectId = $_POST['categoriesId'];

if($sectId) { 

 $sql = "DELETE FROM sections WHERE sect_id = {$sectId}";

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

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