I want to learn PHP and am brand new to it as of yesterday. I got seretha’s tut to work to send me an email from flash, which is perfect, but I want to know why the HTML version isn’t working for me. I get this error in my server’s log:
[error] [client 66.167.132.49] (2)No such file or directory: Malformed header: No recipient addresses found in header
I got the error right away so I tried to figure it out myself:
I changed the email address (obviously) to my own and have been putzing around, moving tags around and trying to understand the $fromEmail part - what am I missing. Please forgive me for being new at this, but it’s just frustrating me.
Alright, it works! I guess I should have read it a little better, I would have figured it I think. I also had to change </text> to </textarea> for it to work correctly. One more thing: You can’t use all punctuation (i.e. apostrophe) when sending that email without it adding slashes in the sent email. Anyway around that?
<?
if (($REQUEST_METHOD=='POST')) {
////////////////////////////////
// This loop removed "dangerous" characters from the posted data
// and puts backslashes in front of characters that might cause
// problems in the database.
////////////////////////////////
for(reset($HTTP_POST_VARS);
$key=key($HTTP_POST_VARS);
next($HTTP_POST_VARS)) {
$this = addslashes($HTTP_POST_VARS[$key]);
$this = strtr($this, ">", " ");
$this = strtr($this, "<", " ");
$this = strtr($this, "|", " ");
$$key = $this;
}