<html>
<head>
<title>HALAMAN ENTRY </title>
<style type="text/css">
.labelfrm{
display:block;
font-size:small;
margin-top:5px;
}
.error{
font-size:small;
color:red;
}
</style>
</head>
<body align="center">
<?php
// include "menu.php";
?>
<h1>FORMULIR SIMPAN</h1>
<form action="simpan.php" method="post" id="frm">
<table align="center">
<tr>
<td><label for="id" class="labelfrm">ID : </label></td>
<td>
<input type="text" name="id" id="id" maxlength="3" class="required" size="3"
<?php
include "koneksi.php";
$query = mysqli_query($dbconnect, "SELECT max(id)+1 FROM siswa")
or die (mysqli_error($dbconnect));
while ($row = mysqli_fetch_array($query)){
?>
value="<?php echo "{$row[0]}";?>"
<?php
}
?>
</td>
</tr>
<tr>
<td><label for="nama" class="labelfrm">Nama : </label></td>
<td><input type="text" name="nama" id="nama" maxlength="25" class="required" size="25"/></td>
</tr>
<tr>
<td><label for="alamat" class="labelfrm" >Alamat : </label></td>
<td><input type="text" name="alamat" id="alamat" size="50" class="required"/></td>
</tr>
<tr>
<td><label for="tahun" class="labelfrm">Tahun : </label></td>
<td>
<select name="tahun">
<option value="2019">2019</option>
<option value="2018">2018</option>
<option value="2017">2017</option>
</select>
</td>
</tr>
<tr>
<td><label for="kelas" class="labelfrm">Kelas : </label></td>
<td>
<select name="kelas">
<option value="TKR">TKR</option>
<option value="TB">TB</option>
<option value="TKJ">TKJ</option>
</select>
</td>
</tr>
<tr>
<td><label for="rombel" class="labelfrm">Rombel : </label></td>
<td>
<select name="rombel">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</td>
</tr>
<tr>
<td><input type="submit" name="input" value="Simpan" id="input"/></td>
<td><input type="reset" name="clear" value="clear" id="clear"/></td>
</table>
</form>
<br><br>
</table>
<br><br><br>
<?php
// include "tglskg.php";
?>
</body>
</html>
Tidak ada komentar:
Posting Komentar
Komentarlah dengan bijak no Spam