Hi All,
I attempting to use the following actionscript and php code to send from a flash form that I have created.
However I have used a combo box from the built in flash 8 components and I'm not getting the emails through with the data that is being selected in the combo box. I've attempted to create the code I think would extract this information but I'm not having much look?
Also I've attempted to add in a carboncopy email address so that more than one of my companies departments gets the contact form emailed to them.
This has not worked either?
I've highlight the two parts of the scripts that I have created below
The code is taken from the tutorial
Sending Mail with PHP
p.s. I've never wrote any PHP before so have guessed when doctoring this script.
Actionscript:
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sendBU.onRelease = function() {
senderLoad.nameInput = nameInput.text;
senderLoad.emailInput = emailInput.text;
senderLoad.companyInput = companyInput.text;
senderLoad.contacttelInput = contacttelInput.text;
senderLoad.countyCOMBO = countyCOMBO.ComboBox.text;
senderLoad.sendAndLoad("http://www.tees.me.uk/Book/send.php",receiveLoad);
}
PHP:
<?PHP
$to = "adam.casey@i-sware.com";
$cc = "adam.casey@i-sware.com";
$subject = "Online Flip Book Demo Request";
$message = "Name: " . $nameInput;
$message .= "\nEmail: " . $emailInput;
$message .= "\nCompany: " . $companyInput;
$message .= "\nTelephone: " . $contacttelInput;
$message .= "\nLocation: " . $countyCOMBO;
$headers = "From: $emailInput";
$headers .= "\nReply-To: $emailInput";
$sentOk = mail($to,$cc,$subject,$message,$headers);
echo "sentOk=" . $sentOk;
?>
Help please!