Hello Friends how to get data from database in Drop-down list?
This is my code but i can't get data in Drop-down list,
This is my php code.
public function System_parameter_dropdown_value() {
$sql= " SELECT * FROM SYSTEM_PARAMETERS WHERE PARAMETER_KEY='ROLE_TYPE'";
$rs= mysql_query($sql) or die(mysql_error());
$option_list="<option value=0>Select Role Type</option>";
while($data= mysql_fetch_assoc($rs)) {
$option_list.="<option value='$data[PARAMETER_KEY]'>
$data[PARAMETER_VALUE]</option>";
}
return $option_list;
}
This is my html option list, When i run the code it's show nothing in Dropdown list
<label class="control-label" for="roleid" style="padding-right: 80px;">ROLE TYPE</label>
<select id="" name="roleid">
<?php echo $option_list['PARAMETER_KEY']['PARAMETER_VALUE'];?>
</select>
I am Stuck on this code , please Guide me How to Resolve it.