<?php
include '../../koneksi.php';

$kelas = $_GET['kelas'];

$q = mysqli_query($koneksi, "
    SELECT user_id, nama_lengkap, nisn 
    FROM siswa 
    WHERE kelas='$kelas'
    ORDER BY nama_lengkap ASC
");

echo "<option value=''>-- Pilih Siswa --</option>";
while ($s = mysqli_fetch_assoc($q)) {
    echo "<option value='{$s['user_id']}'>
        {$s['nama_lengkap']} ({$s['nisn']})
    </option>";
}
