4 Replies Latest reply on May 28, 2008 1:02 AM by nihao_paul

    Problem with login/register Script (Flex, PHP, MySQL)

    jvankuijk
      Hi all,
      I'm having problems with my first application I wrote in Adobe Flex ever. Hope you guys can help me out...
      The problem is that I want the program to check if the given username is already taken or not. I'll post my Flex code here:

      So it calls a Php file, where all of the data found in the MySQL database is saved into an object and is then sent back via een XML-file to Adobe Flex.
      This line is where my problem is:

      if (userRequest.lastResult.users.user.username == username.text){
      mx.controls.Alert.show("Deze Persoon bestaat al!");
      }
      else {
      maakGebruiker();
      }
      The if loop does not seem to work, I think there's a problem with: "userRequest.lastResult.users.user.username"
      I'll post my PHP code here: