i've got a flash mail form which is processed by php
here are the variables which come from flash, and are sent by mail:
for( $i=1; $i<=4; $i++){
${"var".$i} = $_POST["var$i"];
${"var".$i} = utf8_decode(${"var".$i});
${"var".$i} = stripslashes(${"var".$i});
//${"var".$i} = nl2br(${"var".$i});
}
var4 is the message
when you type the message, you can press <enter> a go to a new line in the text box
the problem is that the newlines aren't displayed in the email
instead of:
one line
another line,
I get
one lineanother line
I tried using nl2br() but I get the br tags:
one line<br />another line
here is the code that sends the email:
$message ="
name: $var1\n
subject: $var3\n
comments: $var4
";
mail($var2,"thank you from nunomira", $message, "From: $from");
those \n which separate the name from the subject work fine...
the problem is with the \n that should exist in $var4...