3 Replies Latest reply on Jun 26, 2006 11:11 AM by inactiveforumnotifier

    Custom Login Help

    manteratech
      Im trying to call an HTTPService and get a result which does work, however i cannot figure out how to get an if statement to work! If a user is valid in the database i want to set this userid to the userid returned. Can i do this, i must be doing something wrong !!! It will return a 0 if no user is found matching, if found it will set the userid to their id in the DB such as "11978".

      Thanks for helping a newbie !!!

      here is the code im using............

      <mx:HTTPService id="sendLogin" url=" http://http://www.bleh.com/blah.cfm" method="POST">
      <mx:request>
      <username>myusername</username>
      <password>userspassword</password>
      </mx:request>
      </mx:HTTPService>

      <mx:Script>
      [Bindable]
      public var userid:Number = 0;
      function myLogin(){
      sendLogin.send();
      if (sendLogin.lastResult.user.userdata.userid != 0){
      userid = sendLogin.lastResult.user.userdata.userid;
      }
      }
      </mx:Script>
      <mx:Text x="307" y="41" text="{userid}"/>