Не сохраняет все чекбоксы, только один. В интернете читал, что нужно, что бы был массив, но ничего не понял. форма такая
<div class="scrollbox">
<?php $class = 'odd'; ?>
<?php foreach ($categories as $category) { ?>
<?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
<div class="<?php echo $class; ?> <?php echo ($category['disabled'] ? 'disabled' : ''); ?>">
<?php if ($seller['ms.categ'] == $category['category_id']) { ?>
<input type="checkbox" name="seller[categ]" checked="checked" value="<?php echo $category['category_id']; ?>"/>
<?php echo $category['name']; ?>
<?php } else { ?>
<input type="checkbox" name="seller[categ]" value="<?php echo $category['category_id']; ?>"/>
<?php echo $category['name']; ?>
<?php } ?>
</div>
<?php } ?>
</div>
часть кода для записи в базу
$sql = "UPDATE " . DB_PREFIX . "ms_seller
SET description = '" . $this->db->escape($data['description']) . "',
company = '" . $this->db->escape($data['company']) . "',
adress = '" . $this->db->escape($data['adress']) . "',
sites = '" . $this->db->escape($data['sites']) . "',
datas = '" . $this->db->escape($data['datas']) . "',
ports = '" . $this->db->escape($data['ports']) . "',
rubrs = '" . $this->db->escape($data['rubrs']) . "',
categ = '" . $this->db->escape($data['categ']) . "',
nickname = '" . $this->db->escape($data['nickname']) . "',
country_id = " . (int)$data['country'] . ",
zone_id = " . (int)$data['zone'] . ","
. (isset($data['status']) ? "seller_status= " . (int)$data['status'] . "," : '')
. (isset($data['approved']) ? "seller_approved= " . (int)$data['approved'] . "," : '')
. "paypal = '" . $this->db->escape($data['paypal']) . "',
banner = '" . $this->db->escape($banner) . "',
avatar = '" . $this->db->escape($avatar) . "'
WHERE seller_id = " . (int)$seller_id;
$this->db->query($sql);
Подскажите, в какую сторону капать?