# LoadVars undefined

**URL:** <https://forum.kirupa.com/t/loadvars-undefined/327627>\
**Category:** flash\
**Created:** [March 15, 2012, 2:09pm UTC](https://forum.kirupa.com/t/loadvars-undefined/327627 "2012-03-15T14:09:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenrage](https://avatars.discourse-cdn.com/v4/letter/z/8e7dd6/32.png) [@zenrage](https://forum.kirupa.com/u/zenrage)\
**Post date:** [March 15, 2012, 2:09pm UTC](https://forum.kirupa.com/t/loadvars-undefined/327627/1 "2012-03-15T14:09:45Z")

</div>

[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]

```auto
[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
<?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] ![](http://forum.kirupa.com/uploads/kirupa/798/c985a958819d8917.gif)
