04-14-2010, 03:24 PM
[eluser]nir[/eluser]
Hello All
I am trying to display in an Edit view results from database. it all works fine for the textboxs, but when i try to display the value at a dropdown box it displays null
here is my code:
controller:
view:
i do get the drop down box with the states but the third parameter which suppose to echo the value from the database does not show
thanks in advanced,
nir
Hello All
I am trying to display in an Edit view results from database. it all works fine for the textboxs, but when i try to display the value at a dropdown box it displays null
here is my code:
controller:
Code:
$data['states'] = $this->model->get_states();
$data['student_info'] = $this->model->get_student_info($id);
$this->load->view('form.php',$data);
view:
Code:
<?php echo form_dropdown('field_name', $states, $student_info['state'] ) ; ?>
i do get the drop down box with the states but the third parameter which suppose to echo the value from the database does not show
thanks in advanced,
nir