SCRIPT FORM PHP
FORM
<!-- Main Content -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Form Izin</title>
</head>
<body>
<form method="post" action="insertizin.php">
<center><table width="500" height="200" border="10" cellpadding="10" cellspacing="5">
<tr>
<td>ID Perizinan</td>
<td>:</td>
<td><input type="text" name="id_izin"></td>
</tr>
<tr>
<td>Nama Siswa</td>
<td>:</td>
<td><input type="text" name="nama"></td>
</tr>
<tr>
<td>Kelas</td>
<td>:</td>
<td><select name="kelas" id="kelas">
<option value=" ">Kelas</option>
<?php
include 'koneksi.php';
$query = mysqli_query($koneksi,"select * from kelas");
while($data = mysqli_fetch_array($query))
{
echo"<option value='$data[1]'>$data[1]</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>Jurusan</td>
<td>:</td>
<td><select name="jurusan" id="jurusan">
<option value=" ">Jurusan</option>
<?php
include 'koneksi.php';
$query = mysqli_query($koneksi,"select * from jurusan");
while($data = mysqli_fetch_array($query))
{
echo"<option value='$data[1]'>$data[1]</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>Nama Orang Tua</td>
<td>:</td>
<td><input type="text" name="ortu"></td>
</tr>
<tr>
<td>Tanggal Izin</td>
<td>:</td>
<td><input type="date" name="tgl_izin"></td>
</tr>
<tr>
<td>Tanggal Masuk</td>
<td>:</td>
<td><input type="date" name="tgl_masuk"></td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td><textarea name="alamat" cols="21" rows="4"></textarea></td>
</tr>
<tr>
<td colspan="3">
<center><input type="submit" name="ok" value="OK">
<input type="reset" name="cancel" value="CANCEL"></center>
</td>
</tr>
</table>
</center>
</form>
</body>
</html>
<!-- Main Content -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Form Izin</title>
</head>
<body>
<form method="post" action="insertizin.php">
<center><table width="500" height="200" border="10" cellpadding="10" cellspacing="5">
<tr>
<td>ID Perizinan</td>
<td>:</td>
<td><input type="text" name="id_izin"></td>
</tr>
<tr>
<td>Nama Siswa</td>
<td>:</td>
<td><input type="text" name="nama"></td>
</tr>
<tr>
<td>Kelas</td>
<td>:</td>
<td><select name="kelas" id="kelas">
<option value=" ">Kelas</option>
<?php
include 'koneksi.php';
$query = mysqli_query($koneksi,"select * from kelas");
while($data = mysqli_fetch_array($query))
{
echo"<option value='$data[1]'>$data[1]</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>Jurusan</td>
<td>:</td>
<td><select name="jurusan" id="jurusan">
<option value=" ">Jurusan</option>
<?php
include 'koneksi.php';
$query = mysqli_query($koneksi,"select * from jurusan");
while($data = mysqli_fetch_array($query))
{
echo"<option value='$data[1]'>$data[1]</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>Nama Orang Tua</td>
<td>:</td>
<td><input type="text" name="ortu"></td>
</tr>
<tr>
<td>Tanggal Izin</td>
<td>:</td>
<td><input type="date" name="tgl_izin"></td>
</tr>
<tr>
<td>Tanggal Masuk</td>
<td>:</td>
<td><input type="date" name="tgl_masuk"></td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td><textarea name="alamat" cols="21" rows="4"></textarea></td>
</tr>
<tr>
<td colspan="3">
<center><input type="submit" name="ok" value="OK">
<input type="reset" name="cancel" value="CANCEL"></center>
</td>
</tr>
</table>
</center>
</form>
</body>
</html>
Comments
Post a Comment
Mohon dengan komentar yang sopan dan membangun