I've been trying to do exactly what you're talking about, so this discussion was really helpful to me.
Now I have the same question: is there an easy way to get rid of the Submit=Submit line that is generated by this code? It is irrelevant to the e-mail recipient. I also have a hidden field in my form which contains what I want the subject of the e-mail to be. It doesn't need to be in the body of the e-mail as well. (The reason I'm using a hidden field instead specifying the subject as part of the mail () function is that I am using the same code to process many different forms.)
Also, to account for line breaks in textareas I'm using the nl2br () function, and I'm having a strange problem with it.
This code:
foreach ($_POST as $key => $value) {
$value = nl2br ($value);
echo " $key = $value <br> ";
$info .= " $key = $value <br> "; }
is outputting the information typed into the fields twice, once without <br> and once with, as in:
Content=blah blah blahblah
blah
blah
when what I typed in was
blah
blah
blah
Thanks for any help.
Campbell