# Need help to return variables into Flash AS 3.0

**URL:** <https://forum.kirupa.com/t/need-help-to-return-variables-into-flash-as-3-0/279175>\
**Category:** programming\
**Created:** [January 10, 2009, 5:52pm UTC](https://forum.kirupa.com/t/need-help-to-return-variables-into-flash-as-3-0/279175 "2009-01-10T17:52:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arundracula](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@arundracula](https://forum.kirupa.com/u/arundracula)\
**Post date:** [January 10, 2009, 5:52pm UTC](https://forum.kirupa.com/t/need-help-to-return-variables-into-flash-as-3-0/279175/1 "2009-01-10T17:52:49Z")

</div>

Using this Actionscript:

```auto

var loader=new URLLoader();
var loaderURL=new URLRequest("test.php");
var loaderVars=new URLVariables();

loaderVars.nameTxt="someName";

loaderURL.method=URLRequestMethod.POST;
loader.dataFormat=URLLoaderDataFormat.VARIABLES;

loaderURL.data=loaderVars;
loader.load(loaderURL);

loader.addEventListener(Event.COMPLETE,completed);

function completed(e):void{
 trace(e.target.data.output);
}

```

and this php

```auto
<?php
$var=$_POST['nameTxt'];
echo "&output=$var";
?>

```

flash traces this:

```auto

$var";
?>

```

Can anyone help me how to recieve variables from PHP correctly. This code is displaying everything after that &output= and not displaying the variable but $var itself.

Please tell a way to recieve multiple variables…:puzzle:
