hey guys i already resolved it however, it is static heres the code
<?php
$CATEGORY = 5; //from DB table, consider 3 as category id for sample
$sql="SELECT tblcourse.id as id, tblcourse.course as course FROM tblcourse";
$result=mysql_query($sql) or die(mysql_error());
$options="";
while ($row=mysql_fetch_assoc($result)) {
$id=$row["id"];
$thing=$row["course"];
$isSel = ($CATEGORY == $id)?"selected":'';
$options.= " <OPTION VALUE='$id' $isSel>$thing</option>";
}
?> the $CATEGORY is set into 5.. How to set it dynamically so that whatever i selected it populate the combobox with its desired id?