Spikeysonic Posted November 12, 2011 Share Posted November 12, 2011 What am I doing wrong? All I want is a flash and php email form working. At best i get the elements emailed surrounded by all the html formatiing tags makign it impossible to head or only a few (ie messahe and phone) show up in email sent or more often nothign gets sent at all. In the flash filn I have a send button with onClipEvent(data){ _root.nextFrame(); } actioned on the form movie in flash And on(release){ form.loadVariables("email_send.php", "POST"); } script on the send button. The movie where the form is places has 5 fields made with input text with Instant names: Inp_Name Inp_Department Inp_Email Inp_Phone Inp_Message their variables are; name dept email phone message Also in the properties theya re all set to HTML rednering is set to off and the webssite is www.chriscreativity.com Why does it not work at all and if it does how do I loose the htmal formings crap and get it to work please <strong><?php /* --------------------------- php and flash contact form. by www.MacromediaHelp.com --------------------------- Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, so make sure your email (on last line of this file) is one hosted on same server. --------------------------- */ $sendTo = "[email protected]"; $subject = "Message from chriscreativity.com"; // read the variables form the string, (this is not needed with some servers). $headers = $_POST["name"] . $_POST["dept"] . $_POST["email"] . $_POST["phone"]; $message = $_POST["message"]; mail($sendTo, $subject, $message, $headers); ?></strong> [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/250969-help-wth-flash-email-form-and-php-please-cant-get-it-working-at-all-and-if-i-do/ Share on other sites More sharing options...
trq Posted November 12, 2011 Share Posted November 12, 2011 The data you are passing to mail's header argument make no sense at all. Quote Link to comment https://forums.phpfreaks.com/topic/250969-help-wth-flash-email-form-and-php-please-cant-get-it-working-at-all-and-if-i-do/#findComment-1287508 Share on other sites More sharing options...
Spikeysonic Posted November 12, 2011 Author Share Posted November 12, 2011 In what way please? I have never used php before. I was only as flash needed it, how should it be done? As said all those variables were set in flash to the input text boxes, which flash was supposed to send to the php to process them and send the info to an email. WITHOUT all the <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="16" COLOR="#000000" LETTERSPACING="0" KERNING="0">AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="16" COLOR="#000000" crap...the AAAAAAAAAAAAAAAAAAAAAA was the test send Exactly what is wrong, why and how do I fix it please Quote Link to comment https://forums.phpfreaks.com/topic/250969-help-wth-flash-email-form-and-php-please-cant-get-it-working-at-all-and-if-i-do/#findComment-1287559 Share on other sites More sharing options...
trq Posted November 12, 2011 Share Posted November 12, 2011 mail. Quote Link to comment https://forums.phpfreaks.com/topic/250969-help-wth-flash-email-form-and-php-please-cant-get-it-working-at-all-and-if-i-do/#findComment-1287561 Share on other sites More sharing options...
Spikeysonic Posted November 12, 2011 Author Share Posted November 12, 2011 <strong><?php /* --------------------------- php and flash contact form. by www.MacromediaHelp.com --------------------------- Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, so make sure your email (on last line of this file) is one hosted on same server. --------------------------- */ $sendTo = "[email protected]"; $subject = "Message from chriscreativity.com"; // read the variables form the string, (this is not needed with some servers). $headers = $_POST["name"] . $_POST["dept"] . $_POST["email"] . $_POST["phone"]; $message = $_POST["message"]; mail(); ?></strong> tried that... nothing came through it was <strong><?php /* --------------------------- php and flash contact form. by www.MacromediaHelp.com --------------------------- Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, so make sure your email (on last line of this file) is one hosted on same server. --------------------------- */ $sendTo = "[email protected]"; $subject = "Message from chriscreativity.com"; // read the variables form the string, (this is not needed with some servers). $headers = $_POST["name"] . $_POST["dept"] . $_POST["email"] . $_POST["phone"]; $message = $_POST["message"]; mail($sendTo, $subject, $message, $headers); before [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/250969-help-wth-flash-email-form-and-php-please-cant-get-it-working-at-all-and-if-i-do/#findComment-1287565 Share on other sites More sharing options...
trq Posted November 12, 2011 Share Posted November 12, 2011 You must have misread the documentation. An example of what headers look like taken directly from the documentation I linked you to is: $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); Yours contain someones name, department, email and phone number all concatenated together in one continuous string that I imagine would look some thing like: [email protected] I would start by leaving the header argument out all together as not all servers are going to require it. Be aware though, that without valid headers, allot of mail will go to the trash. Quote Link to comment https://forums.phpfreaks.com/topic/250969-help-wth-flash-email-form-and-php-please-cant-get-it-working-at-all-and-if-i-do/#findComment-1287566 Share on other sites More sharing options...
Spikeysonic Posted November 12, 2011 Author Share Posted November 12, 2011 Sorry did not realise that was a link. Went through the thread but most of it is way above what I am doing. It was litterally a case of adding a email form to my second flash website. Was told I needed a php file to run it through, I have no idea what apache or mime is etc. I got the basic script from a site www.kirupa.com/developer/actionscript/flash_phpemail.htm Then tried to adapt it for my contact page on www.chriscreativity.com Done in Flash CS5 Which has name, dept, email, phone and message as its variables posted to the php file. Trying to learn from your link I produced this... But It is still not sending anythign to my email at all, let alone one with no html crap tags. Where am I still going wrong please Note this is first time trying a php script. <strong><?php /* --------------------------- php and flash contact form. by www.MacromediaHelp.com --------------------------- Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, so make sure your email (on last line of this file) is one hosted on same server. --------------------------- */ $sendTo = '[email protected]'; $subject = 'Message from chriscreativity.com'; // read the variables form the string, (this is not needed with some servers). $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers = $_POST['name'] . '\r\n' . $_POST['dept'] . '\r\n' . $_POST['email'] . '\r\n' . $_POST['phone'] . '\r\n'. 'X-Mailer: PHP/' . phpversion(); $headers = 'Reply-To: [email protected]' . '\r\n' . $message = $_POST['message']; $message = wordwrap($message, 70); mail($sendTo, $subject, stripslashes($headers), stripslashes($message)); if (mail($sendTo, $subject, stripslashes($headers), stripslashes($message))) { echo 'mail() Success!' . "<br />\n"; } else { echo 'mail() Failure!' . "<br />\n"; } ?></strong> [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/250969-help-wth-flash-email-form-and-php-please-cant-get-it-working-at-all-and-if-i-do/#findComment-1287577 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.