Hi guys, I’m trying to email myself and some data but within the data I keep getting “” in the email and I’m trying to delete them. The problem is coming from the information in the $content variable. I tried a string replace in the code below but this doest work.
Thanks in advance for your help
if(isset($_POST['Submit'])){
$content = $_POST['data'];
$name = $_POST['name'];
$address = $_POST['address'];
$tel = $_POST['tel'];
$email = $_POST['email'];
$content.="<BR><BR>";
$customer = "Customer Details::<br><br>";
$customer.= "Name :: ".$name."<br>";
$customer.= "Address :: ".$address."<br>";
$customer.= "Telephone :: ".$tel."<br>";
$content1 = $content.$customer;
$content1 = str_replace("Á", "", $content1);
//$content1 = htmlspecialchars($content1);
$from = $email;
$subject = "Customer Order Form";
$recipient = "contact234@hotmail.co.uk";
$headers = 'MIME-Version: 1.0' . "\\r\
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\\r\
";
$headers .= "From: <$from>\\r\
";
$mail = mail($recipient, $subject, $content1, $headers, "-f$from");
if($mail){
echo '<span style="font-weight:bold; color:red; margin:100px 0 10px 250px;">Message sent successfully!</span>';
}
}
echo '<BR><BR><BR>';