Email an Attachment through Flash Form?
Date: 10/26/05
(PHP Community) Keywords: php, html, java, web
Hi all...so, I have this Flash presentation to construct for a friend...
1. he wants the user to submit info registration to a flash form
2. the resulting page says "thank you, certificate of authentication has been sent"
3. he wants the jpg of the certificate emailed to the registrant as an attachment.
Do you know the action script/code to do this? it's only a mock up presentation; we would like to fake it as much as possible.
Could it be done with this:
Code:
on (release) { loadVariables("email.php",'POST'); javascript('alert("Thank you for contacting us.");'); }
---------------
PHP Code for email.php
$name = $_POST['Name'];
$email = $_POST['Email'];
$message = $_POST['Message'];
$name = stripslashes($name);
$email = stripslashes($email);
$message = stripslashes($message);
$rec_email = "info@yoursite.com";
$subject = "Online form submission";
$msg_body .= "Name: $name\n\n";
$msg_body .= "E-Mail: $email\n\n";
$msg_body .= "Comments: $message\n\n";
mail($rec_email, $subject, $msg_body);
-------------
And then could a $msg_body be HTML code that embeds the image?
Or could I possibly skip the PHP and use javascript? If so, could you possibly supply the code?
What is possibly the best way to do this? Any help is greatly appreciated thanks so much...
cross-posted to webdesign
Source: http://www.livejournal.com/community/php/358274.html