• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
form_dropdown does not echo selected value from database

#1
[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:
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


Messages In This Thread
form_dropdown does not echo selected value from database - by El Forum - 04-14-2010, 03:24 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.