Link to home
Create AccountLog in
Avatar of flo_the_lil_minx
flo_the_lil_minxFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Strange symbol in php html mail


I have set up a page that sends a confirmation email to a logged in user upon successfil completion of a form but for strange reason it puts a strange symbol before the '£' sign.

eg £149.94

What does this sign mean and how can I get rid of it?

tia Flo
Avatar of rkeith2412
Flag of United States of America image

Can you post the code used to generate the email?
Avatar of flo_the_lil_minx



I have posted the code which contains the table a table from another page that has been included.  The included page is posted under the mailing code

Thanks for looking

$sql ="SELECT * FROM customer WHERE customerID = '$custID'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);

$to = $row['email'];
$subject = "Order confirmation from ''";
$random_hash =md5(date('r', time()));
$headers = "From:\r\nReply-To:";
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\"";

--PHP-alt-<?php echo $random_hash; ?> 
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<? include ("confirm_email.php"); ?>

--PHP-alt-<?php echo $random_hash; ?>--
//copy current buffer contents into $message variable and delete current output buffer
$message = ob_get_clean();
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
echo $mail_sent ? "Mail sent" : "Mail failed";

<-- included table -->

<body bgcolor="#ECD078">

<table width="500px" style="font-family: sans-serif">
<td colspan="3" align="center"><img style="margin:0 auto" src="http:/" alt="I Want That Gadget" width="166" height="142"  /></td>
  <form id="buy" method="post" action="buy_confirm.php">
  <input type="hidden" id="orderID" value="" />
      <td colspan="3" style="border-bottom:1px solid #000"><font size="+2"><p>Your order has been successful, thank you!</p></font>
 	<td width="247" style="text-align:left"><u><b>Item name</b></u></td><td width="138" style="text-align:left"><u><b>Quantity</b></u></td><td width="99" style="text-align:right"><u><b>Price</b></u></td>
             foreach($_SESSION['cart'] as $prodID => $quantity) {    
             $sql = sprintf("SELECT prodName, shortDescription, price FROM product WHERE productID = %d;", $prodID);			 
                 $result = mysql_query($sql);
				 $name = $row['prodName'];
				 $description = $row['shortDescription'];
				 $price = $row['price'];
				 list($name, $description, $price) = mysql_fetch_row($result);
				 $line_cost = $price * $quantity;
				 $total = $total + $line_cost;
                <input type="hidden" id="id" value="<? $row['productID'];?>" />
                         <td align="left"><? echo $name; ?></td>
                         <td align="left"><? echo $quantity; ?> </td>
                         <td align="right">£<? echo $line_cost; ?></td>
             	<td colspan="3" style="border-bottom:1px solid #000" align="right"><b>Free Delivery</font></td>
                 <td colspan="2" align="right">Total</td>
                 <td align="right" style="border-bottom:1px solid #000 ; border-top:1px solid #000"><b>£<? echo $total; ?></b></td>
             	<td colspan="3">&nbsp;</td>
                <td colspan="3" style="text-align:justify">Your order is being processed for dispatch. Once it has been dispatched an email will be sent to you to confirm the estimated delivery date</td>


Open in new window

If it helps when I delete the '£' symbol the strange 'A' symbol goes too
Avatar of flo_the_lil_minx
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account