# Sending data from PHP in Flash AS2

**URL:** <https://forum.kirupa.com/t/sending-data-from-php-in-flash-as2/303397>\
**Category:** programming\
**Created:** [January 19, 2010, 7:29pm UTC](https://forum.kirupa.com/t/sending-data-from-php-in-flash-as2/303397 "2010-01-19T19:29:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShadowWorks](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@ShadowWorks](https://forum.kirupa.com/u/ShadowWorks)\
**Post date:** [January 19, 2010, 7:29pm UTC](https://forum.kirupa.com/t/sending-data-from-php-in-flash-as2/303397/1 "2010-01-19T19:29:03Z")

</div>

Hi,

I’m trying to solve a problem for last couple days.  
I have app in Flash which request some data from MySQL using PHP.  
The PHP script returning (or should return) a variable to notify Flash what to do next with data from MySQL.

```php

case "showAdd":                                                 
         $resultRow = mysql_query("SELECT * FROM food WHERE login='$login' AND del<>1");
        getData(13,$resultRow);
        $status = "showAdd";
        echo "&statusPHP=" .$status;    
break;

```

Script above send to Flash “showADD” +309 characters ???  
if I add just some random echo after the last one so it looks like that

```php

 echo "&statusPHP=" .$status; 
echo "&random";

```

everything works fine, statusPHP in Flash = “showAdd”,  
do anybody have any idea what can cause it?  
it looks like the first time I use echo “&statusPHP=” .$status; in previouse case it works fine, but not the second time I call it. ???

Thanks you for any help.  
Any sugestions more then welcome.
