Gambar 1.0 Ketika Button Proses Diclick Maka Akan Tampil Seperti Gambar 2.0 |
Gambar 2.0 Ketika Click "Lagi" Maka Akan Tampil Seperti Gambar 1.0 |
Coding/Listing Gambar 1.0 (Simpan Dengan Nama latihan14.html) :
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Latihan 14</title>
</head>
<body style="background-image:url(http://localhost/Adam/Background%20Blogger/abstract-blue-backgrounds-26_1920x1200_71454.jpg)">
<form action="cetak.php" method="post">
<font face="Papyrus" color="red"><center><h1>Penginputan Data Pribadi</center></h1></font>
<hr widht=100% size=4 color="green" />
<br>
<table width="500" border="1" align="center" bgcolor="#FFDAB9">
<tr>
<td colspan="2" align="center"><font face="papyrus"><b><i>Input Data Pribadi</td></font></b></i>
</tr>
<tr>
<td width="200">Nama</td>
<td><input type="text" size=40 name="nama"></td>
</tr>
<tr>
<td valign="top">Alamat</td>
<td><textarea rows="4" cols="25" name="alamat"></textarea></td>
</tr>
<tr>
<td>Tanggal Lahir</td>
<td><input type="text" size="15" name="tanggal"></td>
</tr>
<tr>
<td>Tempat Lahir</td>
<td><input type="text" size="20" name="tempat"</td>
</tr>
<tr>
<td>Jenis Kelamin</td>
<td><input type="radio" name="jk" value="Laki-Laki">Laki-Laki
<input type="radio" name="jk" value="Perempuan">Perempuan</td>
</tr>
<tr>
<td>No. Telepon</td>
<td><input type="text" name="telepon" size="15"></td>
</tr>
<tr>
<td>Umur</td>
<td><input type="text" size="2" name="umur">Th</td>
</tr>
<tr>
<td>Pendidikan Terakhir</td>
<td><select name="pendidikan">
<option>--Click Here--</option>
<option value="SMA/SMK">SMA/SMK</option>
<option value="D1">D1</option>
<option value="D3">D3</option>
<option value="S1">S1</option>
<option value="S2">S2</option>
<option value="S3">S3</option>
</select></td>
<tr>
<td border="0" align="center" colspan="2">
<input type="submit" value="Proses"><input type="reset" value="Cancel">
</tr></td>
</table>
<br><br><br><br><br><br><br><br>
<hr width=100% size=4 color="green" />
<center><h5><font face="Papyrus" color="red">Terima Kasih</center></h5></font>
</form>
</body>
</html>
Coding/Listing Gambar 2.0 (Simpan Dengan Nama cetak.php) :
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Latihan 14</title>
</head>
<body style="background-image:url(http://localhost/Adam/Background%20Blogger/abstract-blue-backgrounds-26_1920x1200_71454.jpg)">
<?
$nama=$_POST['nama'];
$alamat=$_POST['alamat'];
$tanggal=$_POST['tanggal'];
$tempat=$_POST['tempat'];
$jk=$_POST['jk'];
$telepon=$_POST['telepon'];
$umur=$_POST['umur'];
$pendidikan=$_POST['pendidikan'];
?>
<center><h1><font face="Papyrus" color="Red">Penginputan Data Pribadi</h1></center></font>
<hr width=100% size=4 color="green" />
<br>
<table width="500" border="1" align="center" bgcolor="#FFDAB9">
<tr>
<td colspan="2" align="center"><font face="papyrus"><b><i>Data Pribadi</td></font></b></i>
</tr>
<tr><td width="200">Nama</td><td><?=$nama?></td></tr>
<tr><td>Alamat</td><td><?=$alamat?></td></tr>
<tr><td>Tanggal Lahir</td><td><?=$tanggal?></td></tr>
<tr><td>Tempat Lahir</td><td><?=$tempat?></td></tr>
<tr><td>Jenis Kelamin</td><td><?=$jk?></td></tr>
<tr><td>No. Telepon</td><td><?=$telepon?></td></tr>
<tr><td>Umur</td><td><?=$umur?> Th</td></tr>
<tr><td>Pendidikan</td><td><?=$pendidikan?></td></tr>
</table>
<br>
<center><h3><font face="algerian">Input <a href="latihan14.html">Lagi</center></font></a></h3>
<br><br><br><br><br><br><br><br><br><br><br>
<hr width=100% size=4 color="green" />
<center><h5><font face="papyrus" color="red">Copyright © 2012 | Powered By Adam Khamarullah</center></font></h5>
</body>
</html>
0 komentar:
Posting Komentar