php - Inserting values from multiple select drop downs with same name -


i have several select menus have same name, because want them insert them same database column.

my lists this.

<span id="books">  <label>book:&nbsp;</label>  <select class="drop"  name="fancat">   <option value="">select one</option>   <?foreach($ficbook $row) :?>     <option value="<?=$row->fic_name?>"><?=$row->fic_name?></option>   <?endforeach;?>  </select> </span> 

now know loop through , array , populate them database , have tried that, in jquery have 1 of these select menus viewable @ time (based on pre-selected value). looping though each value impossible , don't want multiple values being selected anyways. select drop down user sees.

the php in model looks this:

$this->fanfictioncategory = $this->input->post('fancat'); $this->db->insert('story_tbl', $this); 

it supposed inserting column varchar. had enum values listed because thought easier, proved wrong.

how can make work?.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -