# Strange flash + php problem

**URL:** <https://forum.kirupa.com/t/strange-flash-php-problem/259018>\
**Category:** Uncategorized\
**Created:** [April 30, 2008, 1:17pm UTC](https://forum.kirupa.com/t/strange-flash-php-problem/259018 "2008-04-30T13:17:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![x0b](https://avatars.discourse-cdn.com/v4/letter/x/e495f1/32.png) [@x0b](https://forum.kirupa.com/u/x0b)\
**Post date:** [April 30, 2008, 1:17pm UTC](https://forum.kirupa.com/t/strange-flash-php-problem/259018/1 "2008-04-30T13:17:23Z")

</div>

i’ve been having a hard time getting flash to read the output of a php script. the php seems to output name/value pairs ok when accessed in the browser but flash is getting the variables as ‘undefined’ when i try to trace them.

just to test my setup i followed the simple example here - [http://www.heaveninteractive.com/weblog/2008/03/17/using-actionscript-30-with-php-part-1/](http://www.heaveninteractive.com/weblog/2008/03/17/using-actionscript-30-with-php-part-1/) - but it still gives undefined.

if i trace evt.target.data i get

```auto
%3C%3Fphp%0A%0A%24returnVars%20=%20array%28%29%3B%0A%24returnVars%5B%27username%27%5D%20%3D%20%22John%20Doe%22%3B%0A%24returnVars%5B%27email%27%5D%20%3D%20%22johndoe%40hotmail%2Ecom%22%3B%0A%24returnString%20%3D%20http%5Fbuild%5Fquery%28%24returnVars%29%3B%0A%0A%2F%2Fsend%20variables%20back%20to%20Flash%0Aecho%20%24returnString%3B%0A%0A%3F%3E
email is undefined

```

so i can see the values in there, i think it might have something to do with the whitespace % symbols confusing flash.

as you can tell im not the most experienced as3 bod. any ideas my fellow scripters? :ear:
