I'm trying to get selected option in select,I need to make a select from my database and use id to mark which category is set.
echo"<select>";
while ($row = mysql_fetch_array($rezultat1))
{ if ($row['biljka_id']==$GET['b']) {
echo "<option value=".$row['biljka_id']." selected='selected' >".$row['naziv']."</option>";
} else { echo "<option value=".$row['biljka_id'].">".$row['naziv']."</option>";
}
echo"</select>";