<?php 	

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


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

$productId = $_POST['productId'];

if($productId) { 


   $sql = "UPDATE staff SET status_id = 1 WHERE staff_id = {$productId}";		

   $result = $conn->query($sql);
   
   $sql1 = "UPDATE staff_suspension SET status = 1 WHERE staff_id = {$productId}";		

   $result1 = $conn->query($sql1);



 if($conn->query($sql) === TRUE && $conn->query($sql1) === TRUE){
 	$valid['success'] = true;
	$valid['messages'] = "Suspension is successfully Removed";		
 } else {
 	$valid['success'] = false;
 	$valid['messages'] = "Error while Removing Suspension";
 }
			
			
		   


 $conn->close();

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