Answer the question
In order to leave comments, you need to log in
How to make a form to send data to the server?
<?
$el = new CIBlockElement;
$PROP = array();
$PROP['FIO'] = "Михаил";
$PROP['MAIL'] = "[email protected]";
$PROP['PHONE'] = "87654376";
$PROP['TIME'] = "11.00";
$arLoadProductArray = Array(
'IBLOCK_ID' => 34,
'PROPERTY_VALUES'=> $PROP,//Должны быть указаны ВСЕ свойства, не указаные БУДУТ ЗАТЕРТЫ.
'NAME' => ConvertTimeStamp($linuxTimeStamp,'FULL'),
'ACTIVE' => 'Y',
'DATE_ACTIVE_FROM' => ConvertTimeStamp($linuxTimeStamp,'FULL'),
);
if ($PRODUCT_ID) { //Обновим элемент
if (!$res = $el->Update($PRODUCT_ID, $arLoadProductArray)){
echo "Error: ".$el->LAST_ERROR;
}
} else { //Добавим элемент
if (!$PRODUCT_ID = $el->Add($arLoadProductArray)){
echo "Error: ".$el->LAST_ERROR;
}
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question