I first off want to thank everyone for your help and hope everyone is having a great weekend! I recently developed (with a pre-made script) our website www.alliancedirect.net and I am having some problems which seem minor but are giving me a headache for the amount of time I have spent trying to figure out what to do...
I am using Adobe Flash CS4 now on my website. As you can see; most of the items are perfectly done with the site but I am having a couple of problems....esp. with coffeecup form builder. I built the form that I need to be on the site but for some reason I can't seem to incorporate it within the main site within the flash. The part of the site I want the form to work with is the part on the top right which is "about us" and there is actually a form built in it right now but I could not figure out how to do the "mailscript" so I wanted to upload the one with coffee cup form builder. Like I said, the problem I am having is incorporating the form within the flash portion of the site. I always had some problems with this with the news flash but I assume it is the same process but that is within the html portion of the site.
Thanks for reading this and hope to hear from from you soon. Thanks again!
*important about website I have...
For your existing form, you need to pass the variables of the form fields from your actionscript to a php file that sends the email.
Here is an example:
Actionscript Code
PHP Code
Here is an example:
Actionscript Code
on (release) {
name = Name.text;
email = Email.text;
phone = Phone.text;
message = Message.text;
loadVariables("send.php",'POST');
}
name = Name.text;
email = Email.text;
phone = Phone.text;
message = Message.text;
loadVariables("send.php",'POST');
}
PHP Code
<?php
$EmailFrom = $email;
$EmailTo = "You@YourEmailAddress.com";
$Subject = "Website Email";
$Name = Trim(stripslashes($_POST['name']));
$Email = Trim(stripslashes($_POST['email']));
$Message = Trim(stripslashes($_POST['message']));
$IP = $_SERVER['REMOTE_ADDR'];;
$Body = "";
$Body .= "Name: ";
$Body .= $name;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $phone;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $message;
$Body .= "\n";
$Body .= "IP: ";
$Body .= $IP;
$Body .= "\n";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
?>
$EmailFrom = $email;
$EmailTo = "You@YourEmailAddress.com";
$Subject = "Website Email";
$Name = Trim(stripslashes($_POST['name']));
$Email = Trim(stripslashes($_POST['email']));
$Message = Trim(stripslashes($_POST['message']));
$IP = $_SERVER['REMOTE_ADDR'];;
$Body = "";
$Body .= "Name: ";
$Body .= $name;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $phone;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $message;
$Body .= "\n";
$Body .= "IP: ";
$Body .= $IP;
$Body .= "\n";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
?>
CoffeeCup... Yeah, they are the best!
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.