Hi all,
I am having problems with a contact form I am producing in flash which uses php to send mail to a yahoo email address.
I have 5 fields :
first name - (in flash this field is 'firstname')
surname - (in flash this field is 'surname')
email - (in flash this field is 'emailad')
telephone - (in flash this field is 'phone')
message - (in flash this field is 'comment')
you can see the form at
Problem is when I check it on my yahoo mail it is only giving me the first name, email addrss and message.
This is because my script at the moment is only stipulating info for 1 name value, an email value and a message value. I dont know how to change this or add to it so that the other fields will work.
I have tried messing about with the code a little and have spent three hours on it this morning with no joy. I hope it is something fairly simple...
the question is how can I amend these scripts so that i get mail from every field instead of just the 3 which it seems to be referencing at the moment? can anyone help? my code is below :
thanks in advance and in hope!
---------------------------------------------------------
actionscript -
var receiver = new LoadVars();
receiver.onLoad = function() {
gotoAndStop(2);
};
send_btn.onRelease = function() {
var sender = new LoadVars();
sender.name = firstname.text;
sender.email = emailad.text;
sender.message = comment.text.split("\r").join("\r\n");
sender.sendAndLoad("armail.php", receiver, "POST");
};
stop();
-----------------------------------------------------------
php file -
<?php
$sendTo = "myemailaddress@yahoo.co.uk";
$subject = "message from yourdomain.com";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>
I am having problems with a contact form I am producing in flash which uses php to send mail to a yahoo email address.
I have 5 fields :
first name - (in flash this field is 'firstname')
surname - (in flash this field is 'surname')
email - (in flash this field is 'emailad')
telephone - (in flash this field is 'phone')
message - (in flash this field is 'comment')
you can see the form at
Problem is when I check it on my yahoo mail it is only giving me the first name, email addrss and message.
This is because my script at the moment is only stipulating info for 1 name value, an email value and a message value. I dont know how to change this or add to it so that the other fields will work.
I have tried messing about with the code a little and have spent three hours on it this morning with no joy. I hope it is something fairly simple...
the question is how can I amend these scripts so that i get mail from every field instead of just the 3 which it seems to be referencing at the moment? can anyone help? my code is below :
thanks in advance and in hope!
---------------------------------------------------------
actionscript -
var receiver = new LoadVars();
receiver.onLoad = function() {
gotoAndStop(2);
};
send_btn.onRelease = function() {
var sender = new LoadVars();
sender.name = firstname.text;
sender.email = emailad.text;
sender.message = comment.text.split("\r").join("\r\n");
sender.sendAndLoad("armail.php", receiver, "POST");
};
stop();
-----------------------------------------------------------
php file -
<?php
$sendTo = "myemailaddress@yahoo.co.uk";
$subject = "message from yourdomain.com";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>