TABLE BOZUK ACİL YARDIM TEŞEKKÜRLER
Şirketim İçin Site Yapıyorum.
TH - TD kodu ile tablo yaptım, https://www.hizliresim.com/endd6se resimde göründüğü gib. (müşterilerimizin özel bilgileri oldugu için sansürlenmiştir.) Herşey iyi giderken mysqlden cekilen bilgiler sıralanmadı. https://www.hizliresim.com/d329iyk resimde göründüğü gibi yanyana geldi.
<thead class="thead-light">
<tr>
<th scope="col">Kimlik No</th>
<th scope="col">Adı</th>
<th scope="col">Soyadı</th>
<th scope="col">-</th>
<th scope="col">-</th>
<th scope="col">-</th>
<th scope="col">D.Tarihi</th>
<th scope="col">-</th>
<th scope="col">-</th>
<th scope="col">-</th>
<th scope="col">-</th>
<th scope="col">Mahalle</th>
<th scope="col">Cadde</th>
<th scope="col">Kapı No</th>
<th scope="col">Daire No</th>
</tr>
</thead>
<tbody>
tablo yapısı bu şekilde
<tbody>
<tr>
<?php
if($result = mysqli_query($link, $sql))
{
$bulunans = $result->num_rows;
$bulunans2 = "Bulunan kisi sayisi: $bulunans ";
if(mysqli_num_rows($result) > 0){ ?>
<script>
$(document).ready(function(){
$('#Sorgu').toast('show');
});
</script>
<?php
foreach($result as $oku)
{
?>
<td><b><?php echo $oku['TC']; ?></b></td>
<td><b><?php echo $oku['ADI']; ?></b></td>
<td><b><?php echo $oku['SOYADI']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['DOGUMTARIHI']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['MAHALLE']; ?></b></td>
<td><b><?php echo $oku['CADDE']; ?></b></td>
<td><b><?php echo $oku['KAPINO']; ?></b></td>
<td><b><?php echo $oku['DAIRENO']; ?></b></td>
<?php }?>
</tr>
</tbody>
gelen veiler bu sekilde sıralanıyor.
çünkü <tbody>
içerisindeki <tr>
etiketinide döngü içerisine almalısın.
<?php
foreach($result as $oku)
{
?>
<tr>
<td><b><?php echo $oku['TC']; ?></b></td>
<td><b><?php echo $oku['ADI']; ?></b></td>
<td><b><?php echo $oku['SOYADI']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['DOGUMTARIHI']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['-']; ?></b></td>
<td><b><?php echo $oku['MAHALLE']; ?></b></td>
<td><b><?php echo $oku['CADDE']; ?></b></td>
<td><b><?php echo $oku['KAPINO']; ?></b></td>
<td><b><?php echo $oku['DAIRENO']; ?></b></td>
</tr>
<?php }?>