Forum
Php +flash Form Submit Help Needed!
Hi people! ive hit a problem!
I'm creatin a full flash website for my client!
I av a form on it that is workin... however when the form is submit, its send an email, but the email recieved looks like this below, in the inbox...
<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"11\" COLOR=\"#333333\" LETTERSPACING=\"0\" KERNING=\"0\">NEIL</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"11\" COLOR=\"#333333\" LETTERSPACING=\"0\" KERNING=\"0\">NEIL</FONT></P></TEXTFORMAT>
Below is my php script if anybody could put me in the right direction...
<?php
$sendTo = "neil-carpenter@hotmail.co.uk";
$subject = "New message";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["name"];
$message .= $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>
I'm creatin a full flash website for my client!
I av a form on it that is workin... however when the form is submit, its send an email, but the email recieved looks like this below, in the inbox...
<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"11\" COLOR=\"#333333\" LETTERSPACING=\"0\" KERNING=\"0\">NEIL</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"11\" COLOR=\"#333333\" LETTERSPACING=\"0\" KERNING=\"0\">NEIL</FONT></P></TEXTFORMAT>
Below is my php script if anybody could put me in the right direction...
<?php
$sendTo = "neil-carpenter@hotmail.co.uk";
$subject = "New message";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["name"];
$message .= $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>
- Try sticking these header variables in too...
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
The text is coming out as HTML becase it isn't encoded.
Let me know if this sorts it out! -