- Jalankan program XAMPP
- pilih APACHE
- Jalankan program ADOBE DREAMWEAVER
- PILIH PHP
- Kemudian copykan kode dibawah ini dibawah tulisan<body>
<form action="" method="post">
<table width="397" height="149" border="0">
<tr>
<td width="81" height="25">Nama</td>
<td width="10"> </td>
<td width="301"><label for="nama"></label>
<input name="nama" type="text" id="nama" size="50" maxlength="50" /></td>
</tr>
<tr>
<td height="43">Alamat</td>
<td> </td>
<td><label for="alamat"></label>
<textarea name="alamat" id="alamat" cols="45" rows="5"></textarea></td>
</tr>
<tr>
<td height="36">NoTelp</td>
<td> </td>
<td><label for="notelp"></label>
<input name="notelp" type="text" id="notelp" size="12" maxlength="12" /></td>
</tr>
<tr>
<td height="35"> </td>
<td> </td>
<td><label for="kirim"></label>
<input type="submit" name="kirim" id="kirim" value="kirim" />
<label for="gajadi"></label>
<input type="submit" name="gajadi" id="gajadi" value="gajadi" /></td>
</tr>
</table>
</form>
<?php
$nama = $_POST["nama"];
$alamat = $_POST["alamat"];
$notelp = $_POST["notelp"];
$kirim = $_POST["kirim"];
if (!empty($kirim)){
echo "Biodata anda adalah <br>";
echo "Nama: $nama <br>";
echo "Alamat: $alamat <br>";
echo "No Telp: $notelp <br>";
}
?>
6.simpan dalam folder XAMPP pilih HTDOCKS buat folder lalu simpan
7.cara mengeceknya:
Buka web browser
ketik//localhost/nama folder/nama dokumen
0 komentar:
Posting Komentar