Bitrix. Infoblock type of key value
-
Hey! There's a challenge to make a web interface for texting. In short, there's a text field and a field for several numbers. On application to the button by POST, a message is sent as follows:
номер:текст
in returnID
messages. How do I keep information in the infoblock?ID:номер
One element?
-
If you need an infoblock,
- Telephone number (PROPERTY_PHONE)
- There's a processor on the page that will add an element.
Processor code:
<? if(isset($_REQUEST["phone"]) && isset($_REQUEST["mess"]) ){ $el = new CIBlockElement;
$PROP = array(); $PROP["PHONE"] = $_REQUEST["phone"]; // свойству с кодом 12 присваиваем значение "Белый" $arLoadProductArray = Array( "MODIFIED_BY" => $USER->GetID(), // элемент изменен текущим пользователем "IBLOCK_SECTION_ID" => false, // элемент лежит в корне раздела "IBLOCK_ID" => 18,//указать свой "PROPERTY_VALUES"=> $PROP, "NAME" => "Элемент", "ACTIVE" => "Y", // активен "DETAIL_TEXT" => $_REQUEST["mess"], ); if($PRODUCT_ID = $el->Add($arLoadProductArray)) echo $PRODUCT_ID; else echo "Error: ".$el->LAST_ERROR;
}?>
But for your task, you better use Highload-locks. https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=43&CHAPTER_ID=05745