A
A
Alx Dayv2019-05-30 16:35:01
PHP
Alx Dayv, 2019-05-30 16:35:01

How to remove data resending to Bitrix24 in a PHP script?

Good afternoon experts! )
I continue to set up receiving leads from application forms, directly in Bitrix24.
The script is already working and sending data from a simple HTML site via PHP to Bitrix, but there was a problem that two leads come from one form filling - one as it should be with the data as configured in the script, and the second is empty and without a name, Bitrix automatically assigns his number and everything.
Here is the part of the code that sends for sending data - where does the second "Empty" send go here?

// обращаемся к Битрикс24 при помощи функции curl_exec
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_SSL_VERIFYPEER => 0,
  CURLOPT_POST => 1,
  CURLOPT_HEADER => 0,
  CURLOPT_RETURNTRANSFER => 1,
  CURLOPT_URL => $queryUrl,
  CURLOPT_POSTFIELDS => $queryData,
));
$result = curl_exec($curl);
curl_close($curl);
$result = json_decode($result, 1);
if (array_key_exists('error', $result)) echo "Ошибка при сохранении лида: ".$result['error_description']."<br/>";

I'm not strong in PHP, so unfortunately my knowledge is not enough to get to the problem (((
Here's how it looks in Bitrix:
5cefdc6ba58d4646490863.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Loginov, 2019-05-30
@Alxdayv

There is nothing unusual in the php code, just sending a request, most likely problems in the bitrix settings

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question