php - Getting the selected drop down value in codeigniter -
i want selected value drop down list variable. loading drop down list values database initially. inside view file,
<select name="trackerid" style="height:30px; width:140px";> <?php foreach ($imei $row): { echo "<option value=\"trackerid\">" . $row['imie'] . "</option>"; } endforeach; ?> </select>
with above code, able load imei numbers database. when click submit button, want send selected imei database. in controller file,
$newconfarray["imie"] = $this->input->post("trackerid");
but when write simple var_dump test, returns bool(false).
var_dump( $newconfarray["imie"]);
i want selected imei view file. how it? suggestions highly appreciated.
you have not put value in option try this
echo "<option value='".$row['imie']."'>" . $row['imie'] . "</option>";
Comments
Post a Comment