[COLOR=#000000][FONT=verdana]Hey there,[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]i need to built a kiosk application where users can enter their email and name. This information should be emailed. So i have set up a as2 file with 2 input text fields, bot with variables. “name” and “email”. Instance name “name_txt” and “email_txt”.[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]This is my code in flash
[/FONT][/COLOR]
[LEFT]var email = email_txt.text;
var name = name_txt.text;
var my_lv:LoadVars = new LoadVars();
send_btn.onRelease = function(){
my_lv.email = email_txt.text;
my_lv.name = name_txt.text;
my_lv.send("email.php", "_blank", "POST");
}
[/LEFT]
[COLOR=#000000][FONT=verdana]
[/FONT][/COLOR][COLOR=#000000][FONT=verdana]and this is my php code
<?php
$sendTo = "huettig@inter-grosshandel.de";
$subject = "ContactForm";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>
[/FONT][/COLOR][COLOR=#000000][FONT=verdana]i do get the mails, but they appear as “undefined” [/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]maybe you cxan help me out by pointing me in the right direction. Must be a stupid mistake i make there. Thanks for helping me out! [/FONT][/COLOR]