Komputer', '4'), ('DLM', 'Pemrograman Web', '3'), ('ANK', 'Basis Data', '4'), ('KDG', 'Algoritma &
Pemrograman', '4'), ('BDH', 'Rekayasa Perangkat Lunak', '3'), ('JTG', 'Matematika Dasar', '3'), ('THT',
Soal 2
koneksi.php
<?php
mysql_connect("localhost","root","");
mysql_select_db("db_ujiane");
?>
dosen.php
<?php
include ("koneksi.php");
?>
Soal 3
tahun.php
<html>
<TITLE>Menampilkan Data ke Dalam Tabel</TITLE>
<body>
<table border="1">
<tr>
<th>Kode Dosen</th>
<th>Nama Dosen</th>
<th>Mata Kuliah</th>
<th>Jenis Kelamin</th>
<th>Tahun Masuk</th>
</tr>
<?php
include ("koneksi.php");
if (!$hasil_seleksi){
echo "Proses penyeleksian tabel dosen gagal !!!";
} else{
while ($baris = mysql_fetch_array ($hasil_seleksi)) {
echo "<tr>
<td>$baris[kode_dosen]</td>
<td>$baris[nama_dosen]</td>
<td>$baris[matakuliah]</td>
<td>$baris[jenis_kelamin]</td>
<td>$baris[tahun_masuk]</td>
<tr>";
};
};
?>
</table>
</body>
</html>