# Formmail variables

**URL:** <https://forum.kirupa.com/t/formmail-variables/317854>\
**Category:** flash\
**Created:** [January 4, 2011, 7:49pm UTC](https://forum.kirupa.com/t/formmail-variables/317854 "2011-01-04T19:49:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alva](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/alva/32/7449_2.png) [@alva](https://forum.kirupa.com/u/alva)\
**Post date:** [January 4, 2011, 7:49pm UTC](https://forum.kirupa.com/t/formmail-variables/317854/1 "2011-01-04T19:49:33Z")

</div>

I’m trying to make a formmail for a couple of days now and I can’t get the variables from to pass from Flash to php. The php is found and called correctly, because the mail is sent, but the message isn’t there.

In flash:

```auto

var scriptLoader:URLLoader = new URLLoader();
var scriptRequest:URLRequest = new URLRequest("skicka.php");
var skickaDetta:URLVariables = new URLVariables();

skickaDetta.result = "This is my message!";

scriptRequest.method = URLRequestMethod.POST;
scriptRequest.data = skickaDetta;
scriptLoader.dataFormat = URLLoaderDataFormat.VARIABLES;

scriptLoader.load(scriptRequest);
scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful);
scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);

```

and the php:

```auto

<?php 
$message= $_POST['result'];
$to = 'my.name@gmail.com';
$headers = "From: Matteva
" . "Reply-To: $to
" . "X-Mailer: PHP/" . phpversion();
$subject='Matteva-result';
$ok = mail($to, $subject, $message, $headers); 
if($ok) { echo "&server_mes=ok&"; } 
else { echo "&server_mes=fail&"; }
?>

```

I have tried having TEXT instead of VARIABLES as URLLoaderDataFormat (suggested in various discussions).

Any ideas why the php doesn’t recieve the message?
