I'm working on a category section for stories submitted to my website. I have a html select going on in my html and I have that submitting to the database using codeigniter functions. It is submitting to the database, but there seems to be a small problem...the select is only grabbing the last value that is selected. I need to have all the values that are selected entered into the database so I can pull them out at a later date.
This is the html I am using.
<select multiple class="multi" name="wGenre">
<option value="Action/Adventure">Action/Adventure</option> <option value="Angst">Angst</option>
<option value="Crime">Crime</option>
</select>
and then this is what I have in my model.
$this->title = $this->input->post('wTitle');
$this->genre = $this->input->post('wGenre');
$this->db->insert('story_tbl', $this);
Now, I believe the problem is with my database. I originally set up the field as an enum, but that won't work because it's either one or the other selection and I need to have multiples. So then I tried it as a text field, and it's just not grabbing everything. To be honest I'm at a loss and in need of some help. :)