In html form there is a list of multiple choice. It is necessary to make the selected list items go to one DB field, separated by commas.
if ($_POST){ $abon_login = $_POST['login']; $telephone = $_POST['telephone']; $sending = $_POST['sending']; $pay = $_POST['pay']; $orders = $_POST['orders']; $news = $_POST['news']; $other = $_POST['other']; $table = $system_site_prefix . 'erps_services_sms'; database_insert("INSERT INTO `$table` VALUES ('$index', '$abon_login', '$telephone', '".implode(",", $sending)."', '$pay', '$orders', '$news', '$other')"); Selected list items should be entered into the variable of sending , and after - into the base. I tried using the implode function - it did not work out. Please tell me how best to do it.
insert into table(col1, col2, col3, ) values(...)firstly you will see that you are not mistaken with the order of values. Secondly, if there is no list of columns, if in the future you add to the table a column, even an optional one, not used in this insert, you will have to remember to find this query in the program and add something to it ... - Mike