# Passing variables from php to flash

**URL:** <https://forum.kirupa.com/t/passing-variables-from-php-to-flash/252022>\
**Category:** Uncategorized\
**Created:** [February 14, 2008, 11:34pm UTC](https://forum.kirupa.com/t/passing-variables-from-php-to-flash/252022 "2008-02-14T23:34:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitsunegari](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kitsunegari](https://forum.kirupa.com/u/kitsunegari)\
**Post date:** [February 14, 2008, 11:34pm UTC](https://forum.kirupa.com/t/passing-variables-from-php-to-flash/252022/1 "2008-02-14T23:34:32Z")

</div>

Hi there

I have a problem using a very simple URLVariables script with php  
The thing is this sample do works on some servers and doesn’t on other:  
Instead of having the correct values with trace, I get the php code itself.  
That means I get the following string in trace():  
\<?php  
$myresult = $\_POST[‘name’];  
echo "the result is ".$myresult;  
?\>  
Here is the php code file called with URLRequest by flash

```auto
<?php
$myresult = $_POST['name'];
echo "the result is ".$myresult;
?>

```

Here is the actionscript that should display “the result is: foo”

```auto
var urlLoader:URLLoader = new URLLoader();

var urlRequest:URLRequest = new URLRequest("call.php");
urlRequest.data = new URLVariables("name=foo");
urlRequest.method = URLRequestMethod.POST;

urlLoader.addEventListener(Event.COMPLETE, dataloaded);
urlLoader.load(urlRequest);

function dataloaded(e:Event):void
{
var myresult = (e.target as URLLoader).data;
trace(myresult);
}

```

I know it comes from the php configuration on my server because I tested it on another server and it works, but I can’t find what I must change in my php.ini file to get the good results in trace();

Do you have any idea? thanks
