You are on page 1of 1

<?

php
$konek=mysql_connect("localhost", "root", "") or die ("Gagal konek ke server.");
mysql_select_db("sia_smkn4batam") or die ("Gagal membuka database.");
$NISN = $_GET['NISN'];
$query = "select * from nilai where NISN='$NISN'";
$result = mysql_query($query, $konek) or die("gagal melakukan query");
$buff = mysql_fetch_array($result);
mysql_close($konek);
?>
<html>
<head><title>Edit Nilai</title></head>
<body>
<form name="form1" method="post" action="update_nilai.php">
<table>
<tr>
<td width="175">N I S N </td>
<td width="10"> </td>
<td width="138"><input type="text" name="NISN" value="<?php echo
$buff['NISN']; ?>"></td>
</tr>
<tr>
<td width="100">Kode Guru</td>
<td width="10"> </td>
<td width="138"><input type="text" name="kd_guru" value="<?php echo
$buff['kd_guru']; ?>"></td>
</tr>
<tr>
<td width="100">Kode Standar Kompetensi</td>
<td width="10"> </td>
<td width="138"><input type="text" name="kd_SK" value="<?php echo
$buff['kd_SK']; ?>"></td>
</tr>
<tr>
<td width="175">Nilai Angka</td>
<td width="10"> </td>
<td width="138"><input type="text" name="nil_angka" value="<?php echo
$buff['nil_angka']; ?>"></td>
</tr>
<tr>
<td width="175">Nilai Huruf</td>
<td width="10"> </td>
<td width="138"><input type="text" name="nil_huruf" value="<?php echo
$buff['nil_huruf']; ?>"></td>
</tr>

<tr>
<input value="Simpan" type="submit" name="submit"/>
<input type="button" value="Kembali" onClick="self.history.back()"></td></tr>
</table>
</form>
</body>
</html>

You might also like