<?php 	

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


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

$productId = $_POST['productId'];

if($productId) { 


 $sql = "DELETE FROM currency WHERE currency_id = {$productId}";
 
 if($conn->query($sql) === TRUE){
 	$valid['success'] = true;
	$valid['messages'] = "Currency is successfully Deleted";		
 } else {
 	$valid['success'] = false;
 	$valid['messages'] = "Error while Deleting Currency";
 }
			
			
		   


 $conn->close();

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