0 Replies Latest reply on Mar 23, 2010 7:56 AM by ulhas.sm

    databse connectivity problems.. :(

    ulhas.sm

      i m making my college project in flex, php.... its a small database  application.. actually trying to make a crm...

       


      the code for  the http service is as follows
      :

       

      <mx:HTTPService  id="newLeadHS" url="newleadinsert.php" method="POST"  showBusyCursor="true">
            <mx:request xmlns="">
               <leadCompany>
                  {leadCompanyTI.text}
               </leadCompany>
               <leadPhone>
                  {leadPhoneTI.text}
               </leadPhone>
            </mx:request>
         </mx:HTTPService>

       


      the save button on click does "newLeadHS.send()"

       

      this  is my php file....

       

      <?php

       


         echo "<?xml  version=\"1.0\"?>";
        
         $conn = mysqli_connect('localhost',  'root', '', 'crm');
        
         $leadCompany = $_POST['leadCompany'];
         $leadPhone  = $_POST['leadPhone'];
        
         $query = "INSERT into  leads(company, phone) values('$leadCompany', '$leadPhone')";
        
         $result  = mysqli_query($conn, $query);
        
         mysqli_close($conn);
        
      ?>

       

       

       

      and  m getting this error...  Sad

       

      [RPC Fault faultString="Default decoder could not  decode result" faultCode="Client.CouldNotDecode" faultDetail="null"]
         at   mx.rpc.http::HTTPService/http://www.adobe.com/2006/flex/mx/internal::processResult()[E:\dev\3.0.x\frameworks\projec ts\rpc\src\mx\rpc\http\HTTPService.as:872]
         at   mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\3.0.x\frameworks\projec ts\rpc\src\mx\rpc\AbstractInvoker.as:186]
         at   mx.rpc::Responder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:4 1]
         at   mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:74]
         at   DirectHTTPMessageResponder/completeHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\ messaging\channels\DirectHTTPChannel.as:381]
         at  flash.events::EventDispatcher/dispatchEventFunction()
         at  flash.events::EventDispatcher/dispatchEvent()
         at  flash.net::URLLoader/onComplete()

       


      can somebody pls help me??