I need help with selected row after get method... I have table in mysql where fill dropdown rows and I really dont know how to put option value with $_get method... If user want to change some fields(edit it), previous row which is selected and saved needs to be selected... This is code:
<label for="" style="width:100px" id="a1" >Tarifa: </label>
<?php
$result = $db->query("select sifra, porez from porezi");
echo "<select onchange='dropdownn();' style='width:100px' id='tarifa' name='tarifa_porez' class='input-sm form-control'>";
while ($row = $result->fetch_assoc()) {
unset($sifra, $porez);
$sifra = $row['sifra'];
$porez = $row['porez'];
echo '<option value="'.$porez.'"> '.$porez.' %</option>';
}
echo "</select>";
?>
So, this is select, but I need help to read from table which one value is selected and select it on edit link (with $_get).
Thanks guys !
$_GET['tarifa_porez']fetch using given code