I am having a problem with the following:
<?
$theAmount = $_REQUEST['amount'];
$theCurrency = $_REQUEST['currency'];
$theAmount=$theAmount*0.01;
if ($theCurrency=="USD") {
$total="$".number_format($theAmount,2);
$theAmount=$theAmount*0.5;
} else {
$total="£".number_format($theAmount,2);
}
mail($email, "Sales Receipt for Service","
PLEASE PRINT OUT AND KEEP THIS EMAIL FOR YOUR RECORDS
Thank you for your payment of $total for your Service. Your credit card has been securely processed by SecureTrading and you should see AA on your credit card statement.
www.mysite.com","From: support@mysite.com\r\nReply-to: support@mysite.com");
?>
The problem I am having is that US customers are complaining of having a £ symbol instead of $ next to their $total value. Consequently, they think they have been overcharged.
Anything wrong with my code?
Thanks,
Jon