I'm making a website so users can add products to the website. But when I select a certain category on my product form view file and I upload the product, no category id is given to the product and it says category id = 0. 

```
Some database information:

categories table:
Row 1: id
Row 2: name

In the products table:
Row: category_id

```

This is my dropdown menu for the categories in my view form file:

```
 <select name="category_id">
        <?php foreach (get_categories_h() as $category) : ?>
            <option><?php echo $category['name']; ?></option>
        <?php endforeach; ?>
        </select>

```

And this is a part of my db insert function in my controller for my form:

```
$this-> db-> insert('products', array(
                'product_foto' => 'new_'.$data["raw_name"].$data['file_ext'],
                'product_foto_thumb' => 'thumb_'.$dataThumb["raw_name"].$dataThumb['file_ext'],
                'product_naam' => $this->input->post('product_naam'),
                'product_beschrijving' => $this->input->post('product_beschrijving'),
                'ophaal_plaats' => $this->input->post('ophaal_plaats'),
                'category_id' => $this->input->post('category_id'),
                'date_created' => date('Y-m-d'),
                'date_updated' => date('Y-m-d')
            );

```

I hope someone can help me, thanks