Hi, I would like some help please. I have made a contact form on Flash and called on a PHP file to send the form through mail. When I receive the e-mail, it is all messed up with HTML tags of the text formatting everywhere... Even in the "From" and "Subject" part.. Can anybody help me take the formatting off? Is a very simple PHP action, below you will find the flash actionscript (very simple) and the PHP script I am using. Please help!! :)
Here is the example of the mail I am receiving:
Name:<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"_sans\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">John Smith</FONT></P></TEXTFORMAT> E-mail <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"_sans\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">ldskjflk</FONT></P></TEXTFORMAT>
Address: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"_sans\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">jlkjlkj</FONT></P></TEXTFORMAT>
Message: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">lkjlkjlkj</FONT></P></TEXTFORMAT>
here is the actionscript from flash:
stop();
sendBtn.onRelease = function() {
formText._visible=false;
form.loadVariables("email1.php", "POST");
}
and here is the PHP script I am using:
<?php
$sendTo = 'info@bhbmarketingsolutions.com';
$subject = 'Contact from BHB Marketing Solutions Web Page';
$message = "Nombre: $nombre
E-mail $email
Dirección: $direccion
Telefono: $telefono
Codigo Postal: $cp
Pais: $pais
Provincia: $provincia
Comentario: $mess";
$headers = 'From: ' . $_POST['nombre'];
mail($sendTo, $subject, $message, $headers);
?>
I think it may probably be a Flash issue?? or can this be done through PHP?
I read a post in this forum from months ago with kind of the same problem, but the problem wasn't solved. Here is the link of the other post:
http://www.daniweb.com/forums/thread90716.html
And the solution seems to be quite simple.. I tried to do this, but instead of receiving an HTML message, I receive all the HTML tags of the suppossed "HTML" message.
Can someone help me? :)