PDA

View Full Version : Problems with PHP email



25OLLIE25
December 18th, 2006, 10:00 AM
Hi,

Wondered if anybody could help. Created a simple email form on flash and created a simple PHP file to make it work. Unfortunately I can't seem to get it to work. I recieve it in the correct email and the @subject come through, but i get this message in my "from" section:

"<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Verdana\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">ollie_mott@yahoo.co.uk</FONT></P>" </TEXTFORMAT@fhlinux222.fasthosts.co.uk (http://www.kirupa.com/forum/)>

ollie_mott@yahoo.co.uk, was the only bit I wanted in there.

This also happens in the main message, surrounding my input with alignment and size etc. Is there a simple reason to this?

Below is the code i used in the php file.

<?php
$sendTo = "ollie_mott@yahoo.co.uk";
$subject = "A query from your website";

$headers = "From: " . $_POST["email"] . "\r\n";
$headers .= "Phone; " . $_POST["phone"] . "\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>

I have all the input fields in the flash document matching those in the PHP doc.

Hope somebody out there can help.

Regards

Ollie

studio_shompr3d
December 20th, 2006, 10:46 PM
Hmm....it's hard to tell maybe the html code was carried over from your previous form (input text for email), got to see your form code to make it sure