<?php 	
require_once '../../Server/connection.php';
$valid['success'] = array('success' => false, 'messages' => array(), 'currency_id' => '');
if($_POST){	

  $CurrencyName = addslashes($_POST['CurrencyName']);
  $BankName = addslashes($_POST['BankName']);
  $accountName = addslashes($_POST['accountName']);
  $BankAccount = addslashes($_POST['BankAccount']);
  $SwiftCode = addslashes($_POST['SwiftCode']);
  $BankCode = addslashes($_POST['BankCode']);
  $BranchCode = $_POST['BranchCode'];
  
  
				
				$sql = "INSERT INTO currency (currencyName,bank_name,account_name,bank_account,swiftCode,bank_code,branch_code) 
				VALUES ('$CurrencyName', '$BankName', '$accountName', '$BankAccount','$SwiftCode','$BankCode','$BranchCode')";
				
				
				$result = $conn->query($sql);
				
				if($result){
					
					
				$valid['success'] = true;
			    $valid['messages'] = "Bank Details are Successfully Added";
					
				
				}else {
				
                //echo 'no';				
					
				}
				
				

	$conn->close();

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