Hi,
I’ve already searched to see if I could find a solution, but wasn’t able to come up with anything that has helped. So, here’s the problem I am having.
I followed this tutorial for a php mail form in flash:
http://www.flashadvisor.com/tutorial/beginners/custom_php_email_form.php
(and now its offline…geez, great timing…)
Here is the mailform.php:
<?php
$TextVariable = '&results=';
$response = 'Thank you. Your email has been sent.';
echo $TextVariable;
echo $response;
/* recipients */
$recipient .= "info@interaptive.com" ;
/* subject */
$subject = "Interaptive site mail";
/* message */
$message .= "Name: $name
Email: $email
Comments: $comments
";
/* additional header pieces for errors, From cc's, bcc's, etc */
$headers .= "From: $name <$email>
";
/* and now mail it */
mail($recipient, $subject, $message, $headers);
?>
I know that ‘something’ is working, because i get sent emails, but they are blank, except for the headings.(Name:, email:, comments:,) Im a php noob, but obviously there is a problem getting the variables passed from the flash form to the php - and on to the email.
Here is the AS on my send button:
[AS]
on(release){
if (!_root.contents.email.length || _root.contents.email.indexOf("@") == -1 || _root.contents.email.indexOf(".") == -1) {
_root.contents.results = “Please check your email address.”;
} else if (!_root.contents.comments.length) {
_root.contents.results = “Please enter a message.”;
} else if (!_root.contents.name.length) {
_root.contents.results = “Please enter your name.”;
} else {
loadVariables(“http://www.interaptive.com/mailform.php”, “_root.contents”, “GET”);
_root.contents.results = “: : Transmitting : :”;
}
}
[/AS]
I have 3 input textfields, with var names of name, email, comments respectively, as well as a dynamic field with a var name of results.
Does anybody have advice or suggestions as to how to fix this? Please help me out, I’m spinning my tires here=] Thanks, much appreciated!!
cheers
drew