(php) Mailform and HTML tags

Hi

I’m currently trying to create a mailform which supports HTML tags. I’m sending the mail out from my flash file to a .php file, which sends the email.

However, when I receive the mail, the link disappears. So I look in the raw mail (I’m using Gmail), and each time there is a quotationmark ", a backslash , is inserted before.

Now, I’m pretty sure it’s due to the PHP code, is there someway to embed some of the text?

My PHP code:

<?php

// name sent from Flash
$navn = utf8_decode($_POST['navn']);

// e-mail sent from Flash
$email = utf8_decode($_POST['email']);

// message sent from Flash
$kommentar = nl2br(utf8_decode($_POST['kommentar']));

// e-mails receiver
$modtager = "mortenkh@gmail.com";

// e-mails topic
$emne = "E-mail sendt via Flash formmail";

// e-mails sender
$afsender = $navn . "<" . $email . ">";

// send e-mail
mail($modtager, $emne, $kommentar, "From: $afsender
Content-type: text/html; charset=iso-8859-1");

?>

The raw mail data:

Hi,<br />
<br />
How are you doing?  -check out this <a href=\"http://www.macro-design.org\">link</a>.

What I wrote in my mailform:

Hi,

How are you doing? -check out this <a href="http://www.macro-design.org">link</a>.

Have a nice day :snug:

Do you have somewere in youre phpfile addslashes($_POST[‘something’]); ?
If so, then you know what it does :slight_smile:

if you posted youre compleet php code, then i would suggest to skip the utf8_decode