I have a select field. I must fill with options taken from a mysql table. Here is some little php code I have done using codeigniter framework
$idcateg =
you could also just use $().load() and have your PHP code generate the tags
$return = ""; while ($row = mysql_fetch_array($res)) { $value = $row['value']; $text = $row{'text']; $return .= "$text\n"; } print $return; }
...
$('#select').load("=base_url()?>index.php/rubro/list_ajax/");