MARKDOWN 27
Untitled Guest on 21st April 2021 04:36:16 PM

<?php

//asli ppdb $konek = mysqli_connect("localhost","root","root","db_coba") or die ("Gagal konek ke server MySQL");

$nomor = 1; $tampil = "SELECT FROM tbl_ruang ORDER BY id "; $hasil = mysqli_query($konek, $tampil); while ($data = mysqli_fetch_array($hasil)) { echo ''.$data['nm_ruang'].' Kapasitas : '.$data['max'].' siswa'; echo '
'; $urutan = 1; $tampile = "SELECT
FROM tbl_siswa ORDER BY id "; $hasile = mysqli_query($konek, $tampile); while ($rows = mysqli_fetch_array($hasile)) { $diurut = $urutan++; if($data['max'] >= $diurut){

            echo '<div class="row">
            <div class="col-md-1">'.$nomor++.'</div><div class="col-md-1">'.$rows['nama'].'</div><div class="col-md-1"> ID-'.$rows['nopes'].'</div>
            </div>';        
        }
    }

}

?>

Paste - NSI is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.