title: as3 php variables
body: <p>as3 code:</p>
  
  <pre><code>public function exists(uid:String):void {
          request = new URLRequest("http://localhost/index.php");
          request.method = URLRequestMethod.POST;
  
          variables = new URLVariables();
          variables.uid = uid;
          request.data = variables;
  
          loader = new URLLoader();
          loader.dataFormat = URLLoaderDataFormat.VARIABLES;
          loader.addEventListener(Event.COMPLETE, urlLoader_existsHandler);
          loader.load(request);
      }
  
      protected function urlLoader_existsHandler(event:Event):void {
          trace(event);
          //var variables:URLVariables = URLLoader(event.target).data;
          //trace(variables);
          //trace(variables.success);
      }
  </code></pre>
  
  <p>PHP output is </p>
  
  <p>success=1&amp;registration_id=1</p>
  
  <p>Error is:</p>
  
  <p><img src="https://i.stack.imgur.com/OJ3xE.png" alt="Error Image"></p>