# Flash AS3 POST variables to .php file

**URL:** <https://forum.kirupa.com/t/flash-as3-post-variables-to-php-file/312879>\
**Category:** flash\
**Created:** [August 15, 2010, 12:15am UTC](https://forum.kirupa.com/t/flash-as3-post-variables-to-php-file/312879 "2010-08-15T00:15:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjawa](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@benjawa](https://forum.kirupa.com/u/benjawa)\
**Post date:** [August 15, 2010, 12:15am UTC](https://forum.kirupa.com/t/flash-as3-post-variables-to-php-file/312879/1 "2010-08-15T00:15:32Z")

</div>

I am trying to figure out why this is not working. I have a Flash .swf that is attempting to POST some variables to a .php file in the same location as my .swf. My facebook app is in FBML Canvas. Here is the function I am calling. The .php file is never receiving anything. HELP!

public function sendData():void{  
var request:URLRequest = new URLRequest(“[http://apps.facebook.com/MYAPPNAME/api/update.php](http://apps.facebook.com/MYAPPNAME/api/update.php)”);  
request.method = URLRequestMethod.POST;  
var upldata:String = “gameStatus=”+whichType+"&userID="+UID;  
var myVariables:URLVariables = new URLVariables(upldata);  
request.data = myVariables;  
var loader:URLLoader = new URLLoader();  
loader.dataFormat = URLLoaderDataFormat.TEXT;  
loader.addEventListener(Event.COMPLETE, doComplete);  
loader.load(request);  
}
