3 Replies Latest reply on Nov 11, 2010 10:43 PM by kglad

    The Login Code

    Ron Colmen Level 2

      "LOGMEIN" needs to be clicked TWICE to enter? AM I doing something wrong?

      On the first click it displays the INVALID_MC and then when LOGMEIN is clicked for the second time it works???

       

       

      logmein.onRelease = function (){

      regLoad.sendAndLoad("http://www.web.com/my.php",regLd,"GET");

      regLoad.user = name_txt.text;

      regLoad.pass = pass_txt.text;

      }

      regLd.onLoad = function () {

      if (regLd.err == "Login Failed. Please retry."){

      _root.invalid_mc._visible=true;

      }else {

      _root.gotoAndStop(5);

      }

      };

       

      by the way, php works fine.

      $result=mysql_query("SELECT * FROM  comp WHERE username = '$user' AND passwd ='$pass'");

      if(mysql_num_rows ($result) == 0) {

      $login = "&err=Login Failed. Please retry.";

      echo($login);

      } else {

      $row = mysql_fetch_array($result);

      $user=$row['user'];

      $pass=$row['pass'];

      $login = "$user=" . $user . "$pass=" . $pass . "&err=Login Successful.";

      echo($login);

      }