I have a drop-down in my manageDevices View.
<select name="TrackerType" id="dropdown" style="width:68% !important;">
<option value="Mobile">Mobile</option>
<option value="Device">Device</option>
<option value="Other">Other</option>
</select>
I want to save the value of the drop-down in the database in my addDevice view and load the editDevice view with the values retrieved from database.
I was able to save the value of the drop-down to the database.
Now I want to fetch the stored value to the editDevice page and show the selected value in the drop-down. I can get the name of the selected value using,
<?php echo $devicearray['type'] ?>
I want to show this value as the "selected value" in the drop-down.
I am using codeigniter framework to develop this. Any hint will be highly appreciated