# Flash email form undefined

**URL:** <https://forum.kirupa.com/t/flash-email-form-undefined/226527>\
**Category:** flash\
**Created:** [May 22, 2007, 4:32am UTC](https://forum.kirupa.com/t/flash-email-form-undefined/226527 "2007-05-22T04:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [May 22, 2007, 4:32am UTC](https://forum.kirupa.com/t/flash-email-form-undefined/226527/1 "2007-05-22T04:32:37Z")

</div>

I have a flash contact form and it works fine when I am testing it in flash, but when I try it on the net, the onLoad gives me undefined. Any ideas? here is my AS and PHP:

```auto

var dataOut:LoadVars = new LoadVars();
var dataIn:LoadVars = new LoadVars();
dataIn.onLoad = function() {
    var responsetext = this.msgText;
    errorbox.text = responsetext;
};

sendbtn.onRelease = function() {
    checkFields();
};

function checkFields() {
    if (namebox.text == "" || emailbox.text == "" || msgbox.text == "") {
        errorbox.text = "Please fill in all fields.";
    } else {
        dataOut.nametxt = namebox.text;
        dataOut.emailtxt = emailbox.text;
        dataOut.msgText = msgbox.text;
        dataOut.sendAndLoad("http://ostari.com/ronnie/point1/contact.php",dataIn,"POST");
    }
}

```

my php:

```php

<?
foreach ($_REQUEST as $key => $value)
    {
$content .= "$value
";    
    }
$result = mail("ronnie@dop.com","Msg from pointOneMusic.com",$content);
if ($result) 
   {
   echo "&msgText=success";
   }
else
   {
   echo "&msgText=failed";  
   }    
?>

```

So like I said…All is good when I test it in flash( i even receive the email), but on the net it returns undefined and no email ☹
