LDestek adlı üyeden alıntı: mesajı görüntüle
İki kere sorgu yapıp yormanıza gerek yok.

<? echo '<form action="" method="post"> <table class="table"> <tr><th>Seçiniz</th> <td>Seçim 1</td> <td>Seçim 2</td></tr><tr> <td></td> <td><select name="m_tk1">'; $sorgu = $baglanti->query('SELECT id, isim FROM tabloismi where sart = "'.$l_id.'"'); $sonuc = $sorgu->fetch_assoc(); while ($sonuc) { $id = $sonuc['id']; $isim = $sonuc['isim']; echo '<option value="'.$id.'">'.$isim.'</option>'; } echo "</select></td>"; echo "<td><select name=\"m_tk2\">"; while ($sonuc) { $id = $sonuc['id']; $isim = $sonuc['isim']; echo '<option value="'.$id.'">'.$isim.'</option>'; } echo '</select></td></tr> <input type="hidden" name="onceki" value="'.$onceki_id.'" class="form-control" > <td></td> <td><input class="btn btn-primary" type="submit" value="İleri"></td> </table> </form>'; ?>
Merhaba. Deneyip Size Döneceğim...