1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| mysql_connect("127.0.0.1","root","") or die ("Could not connect");
mysql_select_db ("test") or die ("Could not select database");
$request = "SELECT * FROM prospects";
$result = mysql_query($request) or die ("erreur de selection".mysql_error());
while ($row = mysql_fetch_array($result))
{
$params = array();
$params["lastname"] = $row['nom'];
$params["email"] = $row['mail'];
$params["phone"] = $row['telephone'];
$params["company"] = $row['societe'];
$params["country"] = $row['pays'];
$params["description"] = $row['description'];
// user id to assign the lead in vtiger
$params["assigned_user_id"] = 1;
$result = $client->__soapCall("create_lead_from_webform", $params);
} |
Partager