<html>
<head>
<title>PSB SMK TELKOM SANDHY PUTRA MALANG</title>
</head>
<body>
<center>
<h1>PENDAFTARAN SISWA BARU <BR />SMK TELKOM SANDHY PUTRA MALANG</h1>
<form method="post" action="daftar.php">
<table width="500" >
<tr>
<td>NAMA</td>
<td>:</td>
<td><input type="text" name="nama"/></td>
</tr>
<tr>
<td>TEMPAT LAHIR</td>
<td>:</td>
<td><input type="text" name="ttl"/></td>
</tr>
<tr>
<td>TANGGAL LAHIR</td>
<td>:</td>
<td><input type="text" name="tanggal" width="10px" maxlength="2"/>
<select name="bulan">
<?php
$bulan=array("Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember");
$jml_bln=count($bulan);
for($a=0; $a<$jml_bln; $a+=1){
echo"<option value=$bulan[$a]> $bulan[$a] </option>";
}
?>
</select>
<input type="text" name="tahun" width="10px" maxlength="4"/>
</td>
</tr>
<tr>
<td>HOBBY</td>
<td>:</td>
<td><input type="checkbox" name="tidur" value="TIDUR" checked="checked"/>Tidur</input> </td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="checkbox" name="baca" value="MEMBACA" />Membaca</input></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="checkbox" name="tulis" value="MENULIS" checked="checked" />Menulis</input></td>
</tr>
<tr>
<td>JENIS KELAMIN</td>
<td>:</td>
<td><input type="radio" name="jk" value="laki-laki" checked="checked"/>laki-laki</input>
<input type="radio" name="jk" value="perempuan" />perempuan</input>
</td>
</tr>
<tr>
<td>ALAMAT</td>
<td>:</td>
<td><textarea name="alamat" ></textarea> </td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="submit" name="submit" value="KIRIM"><input type="reset" name="reset" value="BERSIHKAN"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
INI UNTUK MENANGKAP VARIABLE DARI HALAMAN PENDAFTARAN
<html>
<head>
<title>SMK TELKOM SHANDY PUTRA MALANG</title>
</head>
<body>
<CENTER><h1>TERIMA KASIH TELAH MENDAFTAR DI<br/>
SMK TELKOM SHANDY PUTRA MALANG</h1>
<table width="500" >
<tr>
<td>NAMA</td>
<td>:</td>
<td>
<?php
echo $_POST["nama"];
?></td>
</tr>
<tr>
<td>TEMPAT LAHIR</td>
<td>:</td>
<td> <?php
echo $_POST["ttl"];
?></td>
</tr>
<tr>
<td>TANGGAL LAHIR</td>
<td>:</td>
<td> <?php
echo $_POST["tanggal"]." ";
echo $_POST["bulan"]." ";
echo $_POST["tahun"]." ";
?>
</td>
</tr>
<tr>
<td>HOBBY</td>
<td>:</td>
<td><?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
echo $_POST["tidur"]." ";
echo $_POST["baca"]." ";
echo $_POST["tulis"]." ";
?></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="checkbox" name="baca" value="baca" />Membaca</input></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="checkbox" name="tulis" value="menulis" checked="checked" />Menulis</input></td>
</tr>
<tr>
<td>JENIS KELAMIN</td>
<td>:</td>
<td><?php
echo $_POST["jk"];
?>
</td>
</tr>
<tr>
<td>ALAMAT</td>
<td>:</td>
<td><?php
echo $_POST["alamat"];
?> </td>
</tr>
<tr>
<td></td>
<td></td>
<td><a href="index.php"><input type="button" name="back" value="kembali"></a></td>
</tr>
</table></CENTER>
</body>
</html>