Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_GET['id'])){
- $id=$_GET['id'];
- $is_soal = true;
- // $query="select * from tabel_soal where id_matkul='$id'";
- $query = "select a.*, b.matkul, c.angkatan, d.ujian, e.dosen from tabel_soal a
- left join tabel_matkul b on b.id_matkul = a.id_matkul
- left join tabel_angkatan c on c.id_angkatan = a.id_angkatan
- left join tabel_ujian d on d.id_ujian = a.id_ujian
- left join tabel_dosen e on e.nip = a.nip
- where a.id_matkul='$id'";
- $result = mysql_query($query);
- $rows = mysql_num_rows($result);
- if(!$rows) {
- echo "<script> document.location.href='./home.php?status=Soal belum dibuat!'; </script>";
- } else {
- $no = 0;
- while( list($id_soal,$pertanyaan,$pilihan_a,$pilihan_b,$pilihan_c,$pilihan_d,$jawaban,$publish,
- $id_angkatan,$id_ujian,$id_matkul,$nip,$matkul,$angkatan,$ujian,$dosen) = mysql_fetch_row($result) ) {
- $no++;
- echo "| $no | $id_soal | $pertanyaan | $pilihan_a | $pilihan_b | $pilihan_c | $pilihan_d | $jawaban | $matkul | $ang
- katan | $ujian | $dosen |<br>\n";
- }
- mysql_free_result($result);
- $_SESSION['id_soal']=$id_soal;
- // di-off dulu echo "<script> document.location.href='soal/t_soal.php'; </script>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement