我有一个网站需要纠正一些代码问题。
客户说明所有信息都未保存到salesforce中。
我怎么能这样做。已经有一个代码来实现这个但是有一些错误。
这是代码:
<?php
$query="INSERT INTO tbl_doit_vehicles ( `intcid`, `varvin`, `intyear`, `varmake`, `varmodel`,`varmilage` ,`varpdfname`,`var_estimate` ,`var_price`,`var_damage`)
VALUES
('$id','$vin','$year','$make','$model','$milage','$pdf_name','$car_estimate','$car_reserve','$car_damage')";
$cleanPOST = array();
$result = mysql_query("SELECT * FROM tbl_get_start_service where int_service_id='$id'");
while($row = mysql_fetch_array($result))
{
$cleanPOST['first_name']=$row['var_first_name'];
$cleanPOST['last_name']=$row['var_last_name'];
$cleanPOST['coupon_code']=$row['var_coupon_code'];
$cleanPOST['phone']=$row['var_phone'];
$cleanPOST['email']=$row['var_email'];
$cleanPOST['state']=$row['var_state'];
$cleanPOST['hr_abt']=$row['var_hear_about'];
}
$res=mysql_query($query);
$oid=$_POST['oid'];
// variable to hold cleaned up a version of $_POST data
/*$cleanPOST['year']=$year;
$cleanPOST['make']=$make;
$cleanPOST['model']=$model;*/
// Loop through the $_POST data and process it
foreach ($_POST as $key=>$value){
$cleanPOST[stripslashes($key)] = stripslashes($value);
// $cleanPOST['year']=$row['var_state'];
}
// Add the Org ID
$cleanPOST["oid"] = $oid;
// Create a new cURL resource
$ch = curl_init();
if (curl_error($ch) != "") {
echo "Error: $error\n";
}
//print_r($cleanPOST);
// Point to the Salesforce Web to Lead page
/*curl_setopt($ch, CURLOPT_URL,
"http://www.salesforce.com/servlet/servlet.WebToLead");*/
curl_setopt($ch, CURLOPT_URL,
"https://test.salesforce.com/servlet/servlet.WebToLead");
// Set the method to POST
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Pass POST data
curl_setopt(
$ch, CURLOPT_POSTFIELDS, http_build_query($cleanPOST));
$fw=curl_exec($ch); // Post to Salesforce
//print_r($fw);
curl_close($ch); // close cURL resource
?>
客户提供一些细节:
Site URL: https://test.salesforce.com/
User Name:
Password:
我是salesforce的新手。我运行上面的php代码并使用用户名和密码登录到salesforce帐户。但我没有看到销售人员保存的值在哪里....
我在哪里可以看到保存的详细信息?
我如何插入完整的详细信息? 这是从客户端给出的屏幕截图 - 它描述了未保存到其中的3个值 - 在图片中圈出。