6 Replies Latest reply on Mar 29, 2010 6:33 AM by Radhakrishna Bhat

    i get this error with my login form i made but i am unsure if it is a problem with my php coding or

      i get this error with my login form when i try to login but i am unsure if it is a  problem with my php coding or my flex code!


      ReferenceError: Error #1069: Property loginsuccess not found on String  and there is no default value.
      at src::main/checkLogin()
      at src::main/__login_user_result()
      at flash.events::EventDispatcher/dispatchEv…
      at flash.events::EventDispatcher/dispatchEv…
      at  HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
      at  mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
      at mx.rpc::Responder/result()
      at mx.rpc::AsyncRequest/acknowledge()
      at DirectHTTPMessageResponder/completeHandl…
      at flash.events::EventDispatcher/dispatchEv…
      at flash.events::EventDispatcher/dispatchEv…
      at flash.net::URLLoader/onComplete()





      my php coding is:



      [php]<?php

      define( "DATABASE_SERVER", "localhost" );

      define( "DATABASE_USERNAME", "f4r" );

      define( "DATABASE_PASSWORD", "cool23" );

      define( "DATABASE_NAME", "bignixs1" );

      //connect to the database

      $mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME,  DATABASE_PASSWORD) or die(mysql_error());

      //select the database

      mysql_select_db( DATABASE_NAME );

      //asign the data passed from Flex to variables

      $username = mysql_real_escape_string($_POST["usernam…

      $password = mysql_real_escape_string($_POST["passwor…

      //Query the database to see if the given username/password combination  is valid.

      $query = "SELECT * FROM users WHERE username = 'username' AND password =  'password'";

      $result = mysql_fetch_array(mysql_query($query));

      //start outputting the XML

      $output = "<loginsuccess>";

      //if the query returned true, the output  <loginsuccess>yes</loginsuccess> else output  <loginsuccess>no</loginsuccess>

      if(!$result)

      {

      $output .= "no";          

      }else{

      $output .= "yes";     

      }

      $output .= "</loginsuccess>";

      //output all the XML

      print ($output);

      ?>[/php]