<html>
<head></head>
<body>
<center>Laporan Data Siswa</center><br><br>
<form name="form" method="post" action="input_siswa.php">
<input type="submit" name="Submit" value="Tambah Data"></form>
<table width="900" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000"
celpading="2" celspacing="1" >
<tr bgcolor="#CCFFFF">
<td><div align="center"><strong>NO</strong></div></td>
<td><div align="center"><strong>NIS</strong></div></td>
<td><div align="center"><strong>Nama</strong></div></td>
<td><div align="center"><strong>kelas</strong></div></td>
<td><div align="center"><strong>no_absen</strong></div></td>
<td><div align="center"><strong>jurusan<strong></div></td>
<td><div align="center"><strong>Keterangan<strong></div></td>
</tr>
<?php
// koneksi database
mysql_connect('localhost','root','root');
mysql_select_db('sisfokol');
// membaca tabel dan menampilkannya
$tampil="select * from siswa";
$qryTampil=mysql_query($tampil);
while ($dataTampil=mysql_fetch_array($qryTampil)) {
$no++
?>
<tr bgcolor="#FFFFFF">
<td><?php echo $no ; ?></td>
<td><?php echo $dataTampil['nis']; ?></td>
<td><?php echo $dataTampil['nama']; ?></td>
<td><?php echo $dataTampil['kelas']; ?></td>
<td><?php echo $dataTampil['no_absen']; ?></td>
<td><?php echo $dataTampil['jurusan']; ?></td>
<td><div align="center"><a href="hapus_siswa.php?nis=<?php echo $dataTampil['nis'] ; ?>">Delete</a>
<a href="edit_siswa.php?nis=<?php echo $dataTampil['nis']; ?>">Edit </a></div></td>
</tr>
<?php } ?>
</table>