Welcome Guest, Not a member yet? Register   Sign In
DropDown not showing
#1

[eluser]Unknown[/eluser]
Hi,

I am new with PHP and specialy with CodeIgniter, but I have to develop a web interface to do a query in a database and show the results to the user.

Right now I am trying to use the form_dropdown from the form_helper. I searched a bit in this forum and founded something useful for me now, but I am not getting it to work properly. The dropdown list is from a query in the database. But the form is not showing up. Can someone give me a help?

Right below is the View code:
Code:
<?php
$values = $this->db
   ->select('TIPO_ELEMENTO')
   ->get('SYRIP')
   ->result_array();
$options = array();

foreach($values as $value)
{
  $options[$value['TIPO_ELEMENTO']] = $value['TIPO_ELEMENTO'];
}
return $options;  

echo form_dropdown('TesteTipo',$options,null);


Messages In This Thread
DropDown not showing - by El Forum - 02-24-2012, 05:08 AM
DropDown not showing - by El Forum - 02-24-2012, 05:29 AM
DropDown not showing - by El Forum - 02-24-2012, 06:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB