Welcome Guest, Not a member yet? Register   Sign In
How to save index number of my dropdown list to database?

This is my drop down list

$type = array(
'1' => 'Entertaiment',
'2' => 'Formal',
'3' => 'Service',


echo form_dropdown('type', $type, '2');

I would like to know how do I save into my database as 1 or 2 or 3 (the index number of dropdown).

This is my code that input to database.

$type = $this -> input ->post('type');

I tried submit, and it seems it doesn't pass through any value in $type.

Please help me, urgent Sad

Thanks in advance

Theme © iAndrew 2016 - Forum software by © MyBB