2 Replies Latest reply on Feb 4, 2009 4:53 PM by brettcristofer

    Beginner difficulty

      Hi, I'm stuck on what must be a basic problem.

      I send an HTTPService request to a php script on my server.

      The php script checks a database for the username and password supplied and returns either a true/false response in the following format


      Then my actionscript in my Flex page checks the returned value as follows:

      import mx.messaging.messages.HTTPRequestMessage;
      import mx.rpc.events.ResultEvent;

      private function doLogin(e:MouseEvent):void
      loginCall.url = " http://www.myurl.com/logon2.php";

      private function onResult(e:ResultEvent):void
      if(e.result.loginState == "true")
      currentState = "Logged In"
      mx.controls.Alert.show("Response = " + e.result.loginState);

      <mx:HTTPService id="loginCall" result="onResult(event)" method="POST" useProxy="false">
      <mx:request xmlns="">

      Despite the server returning

      the script is popping up an alert window which says

      [CODE]Response = true[/CODE]

      if it's of any use I will post the full script but can anyone see the problem?

      Does the php script need to output any header info or are the <loginState> tags sufficient for the Flex app to parse the response?