title: PHP send var to AS3 with AJAX or POST
body: <p>All tutorial i found use some file xml, txt, or php with echo. to give vars to AS3 is there way to do it without echo or file. Say i query PHP page.php from flash with AS3 somehow and process response from page.php</p>
  
  <pre><code>var loader:URLLoader = new URLLoader();   
  var request:URLRequest = new  URLRequest("http://mysite.com/test.php");           
  loader.load(request);
  
  loader.addEventListener(Event.COMPLETE, completeHandler);
  loader.addEventListener(IOErrorEvent.IO_ERROR, loaderIOErrorHandler);
  loader.dataFormat = URLLoaderDataFormat.VARIABLES;
  
  function loaderIOErrorHandler(event:IOErrorEvent):void{
      trace("ioErrorHandler: " + event);
  }
  
  function completeHandler (event:Event):void {
  
      this.text1.appendText(loader.data.mykey); //Whatever dataField1 you saved as
  }
  </code></pre>
  
  <p>That works, but how do i make it query php and process its response?</p>