Zoho xml rpc request returns success but no record in database

Zoho xml rpc request returns success but no record in database

I have problem with my application, when i try to insert record from custom html form from localhost i get success response. But when i try to view records in the database view the record is not there.
And if i delete record from my  view and then i try to insert new record i get success result and the record is there i can see it in the view.
By the way i am sending the post request with php curl and it is working ok
Any help with this will be appreciated. 
Here is the code:

  1. $apikey = "xxxxxxxxxxxxxxxxxxxxxx";
  2. $ticket = "xxxxxxxxxxxxxxxxxxxxxxxxx";
  3. $url = "https://creator.zoho.com/api/xml/write/apikey=$apikey&ticket=$ticket";
  4.     $XMLString= "XMLString=<ZohoCreator>
  5.     <applicationlist>
  6.         <application name='xxxxxx'>
  7.             <formlist>
  8.                 <form name='xxxxxxxxxxx'>
  9.                     <add>
  10.                         <field name='Title'>
  11.                             <value>".$_POST['title']."</value>
  12.                         </field>
  13.                         <field name='full_name'>
  14.                             <value>".$_POST['fullName']."</value>
  15.                         </field>
  16.                         <field name='Sex'>
  17.                            <value>".$_POST['sex']."</value>
  18.                         </field>
  19.                         <field name='Date_of_Birth'>
  20.                             <value>".$_POST['birthDate']."</value>
  21.                         </field>
  22.                         <field name='TaxNumber'>
  23.                              <value>".$_POST['taxNumber']."</value>
  24.                         </field>
  25.                         <field name='Mobile_Number'>
  26.                              <value>".$_POST['mobileNum']."</value>
  27.                         </field>
  28.                          <field name='Email'>
  29.                              <value>".$_POST['email']."</value>
  30.                         </field>
  31.                         <field name='Business_Address'>
  32.                              <value>".$_POST['bussAddses']."</value>
  33.                         </field>
  34.                         <field name='Subrb'>
  35.                              <value>".$_POST['subrb']."</value>
  36.                         </field>
  37.                          <field name='State'>
  38.                                 <value>".$_POST['state']."</value>
  39.                         </field>
  40.                         <field name='Post_Code'>
  41.                              <value>".$_POST['postcode']."</value>
  42.                         </field>
  43.                         <field name='is_postal_address'>
  44.                              <value>".$_POST['isPostalAddress']."</value>
  45.                         </field>";
  46. //Postal Address
  47. if(!empty($_POST['postalAddressOpt'])){
  48. $XMLString .= "<field name='Postal_Address'>
  49.                                                <value>".$_POST['postalAddressOpt']."</value>
  50.                                            </field>";
  51. }
  52. //Subrb Postal
  53. if(!empty($_POST['subrbPostalOpt'])){
  54. $XMLString .= "<field name='Subrb_Postal'>
  55.                                                <value>".$_POST['subrbPostalOpt']."</value>
  56.                                            </field>";
  57. }
  58. //State Postal
  59. if(!empty($_POST['statePostalOpt'])){
  60. $XMLString .= "<field name='State_Postal'>
  61.                                                <value>".$_POST['statePostalOpt']."</value>
  62.                                            </field>";
  63. }
  64. //Post Code Postal
  65. if(!empty($_POST['postCodePostalOpt'])){
  66. $XMLString .= "<field name='Post_Code_Postal'>
  67.                                                <value>".$_POST['postCodePostalOpt']."</value>
  68.                                            </field>";
  69. }
  70.   $XMLString .= "<field name='c_bussiness'>
  71. <value>".$_POST['businessIn']."</value>
  72.  </field>
  73.  <field name='a_contractor'>
  74.   <value>".$_POST['aContractor']."</value>
  75.  </field>";
  76. //Contractor checkboxes
  77. if(!empty($_POST['contractorOpt'])){
  78. $XMLString .= "<field name='applicable_t'>
  79.                                                <value>".$_POST['contractorOpt']."</value>
  80.                                            </field>";
  81. }  
  82.   $XMLString .= "<field name='ft_business'>
  83.   <value>".$_POST['ft_business']."</value>
  84.  </field>";
  85. //Contractor checkboxes
  86. if(!empty($_POST['previousANum'])){
  87. $XMLString .= "<field name='Your_previous_ABN_if_you_remember'>
  88.                                                <value>".$_POST['previousANum']."</value>
  89.                                            </field>";
  90. }
  91. //Optional Trading name  
  92. if(!empty($_POST['tradingNameOptional'])){  
  93. $XMLString .= "<field name='Trading_Name_optional'>
  94. <value>".$_POST['tradingNameOptional']."</value>
  95. </field>";
  96. }
  97. $XMLString .= "<field name='ain_business'>
  98.   <value>".$_POST['ain_business']."</value>
  99.  </field>
  100.  <field name='actdatebus'>
  101.   <value>".$_POST['actdatebus']."</value>
  102.  </field>
  103.  <field name='w_register'>
  104.   <value>".$_POST['w_register']."</value>
  105.  </field>";
  106. //Optional Trading name  
  107. if($_POST['w_register'] == "Yes" && !empty($_POST['anne']) && !empty($_POST['goffs']) && !empty($_POST['repat'])){  
  108. $XMLString .= "<field name='What_is_your_estimated_annual_earning'>
  109. <value>".$_POST['anne']."</value>
  110. </field>
  111. <field name='When_will_you_forward_the_GST_to_the_Tax_Office'>
  112. <value>".$_POST['goffs']."</value>
  113. </field>
  114. <field name='How_often_would_you_like_to_report_to_the_ATO'>
  115. <value>".$_POST['repat']."</value>
  116. </field>";
  117. }  
  118.                      
  119.      $XMLString .= "</add>
  120.                 </form>
  121.             </formlist>
  122.         </application>
  123.     </applicationlist>
  124. </ZohoCreator>";


  125. $ch = curl_init ($url);
  126. curl_setopt ($ch, CURLOPT_POST, 1);
  127. curl_setopt ($ch, CURLOPT_POSTFIELDS, $XMLString);
  128. curl_setopt($ch, CURLOPT_FOLLOWLOCATION  ,1);
  129. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  130. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  131. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  132. curl_setopt($ch, CURLOPT_VERBOSE, 1);
  133. curl_setopt($ch, CURLOPT_NOBODY, 0);
  134. $returndata = curl_exec ($ch);

  135. curl_close($ch);
  136. echo $returndata;