Problems With My MX & PHP Mailer

I followed a tutorial at Flash kit on how to make a php mailer with MX, and it ddn’t work.

I followed a different one and it didn’t do what I wanted…

I have followed one that somebody suggested, and it doesn’t work… I just seem to have serious problems in this area.

I used MX to create my form, and have used PHP to create the transmission between the 2.

you can see the file at http://www.innovati0n.com/mail/mail.swf

it doesn’t send mail, but it does do everything else it should. Its F-ing ugly, I just wanted to get it working funtionally before I try to make it pretty!

Please help, the files are attached!

I have PHP 4.2 on my server btw.

Try this script, it should work:

<?
$recipient = "wutever@wutever.com";
unset($HTTP_POST_VARS['onLoad']);
unset($HTTP_POST_VARS['clear']);
$body = "The following information was submitted...

";
foreach($HTTP_POST_VARS as $key => $value) {
	$key = substr($key, 0, -4);
	$body .= "$key: $value
";
}
$from = $HTTP_POST_VARS['name_txt'] . " <" . $HTTP_POST_VARS['email_txt'] . ">";
mail($recipient, $HTTP_POST_VARS['subject_txt'], $body, "From: $from");
?>

Hope this helps!

yours,
h88

The script did work exactly how I wanted it to, I know nothing about PHP so thanks for the script.

Just a few queries,

  1. why does it only work if the .swf is displayed in a html window?

and

  1. in my mail where is says who its from it says “INVALID_ADDRESS@ .SYNTAX-ERROR.” even if I enter a valid email address… anyway to get rid of that?

  2. in the email is says “sub :” then the subject, “fromE” then the from email, if I wanted it to say (for example the full word) “subject:” then the subject, how would I do that or can’t I?

I’m not too bother to be honest, it works and that the main thing but I would be interested to know about the stuff above!

thanks again H88!

the problem is either from your fla OR ur webserver, this script works fine, and i use it everytime!