When I use the following code, I get a new record added to the form, but with empty value. Please help:
<?php
$auth = "xxxxxxxxxxxxxxxxxxx";
$xml = "<ZohoCreator><applicationlist><application name=\"order-management\"><formlist><form name=\"New_Order\">"
$xml .= "<add><field name=\"Track_Number\"><value>100</value></field></add></form></formlist></application></applicationlist></ZohoCreator>";
insert($auth, $xml);
function insert($auth, $xml){
$curl_post_fields = "authtoken=".$auth. "&scope=creatorapi&xmlData=".urlencode($xml);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $curl_url); // set url
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); // set browser/user agent
curl_setopt($ch, CURLOPT_HEADERFUNCTION, 'read_header'); // get header
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_fields);
$response = curl_exec($ch);
curl_close($ch);
}
?>