1. Buat project baru dengan nama code1.php dengan text editor, bisa sublime, notepad++, maupun text editor yang lain
2. Salin code1.php di bawah ini :
<html>
<body>
<form action="welcome.php"
method="post">
<h3>INPUT DATA MAHASISWA</h3>
<table border="0">
<tr>
<td>Nama</td>
<td>:</td>
<td><input type="text"
name="nama"></td>
</tr>
<tr>
<td>Gender</td>
<td>:</td>
<td><input type="radio"
name="gender" value="female">Female<input
type="radio" name="gender"
value="male">Male</td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td><textarea
name="alamat"></textarea></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input type="text"
name="email"></td>
</tr>
<tr>
<td>Website</td>
<td>:</td>
<td><input type="text"
name="website"></td>
</tr>
</table>
<br/>
<input type="submit"
value="Simpan">
</form>
</body>
</html>
4. Salin code welcome.php dibawah ini :
<html>
<body>
<h3>Data
Mahasiswa</h3>
<table
border="0">
<tr>
<td>Nama</td>
<td>:</td>
<td><?php
echo $_POST["nama"]; ?></td>
</tr>
<tr>
<td>Gender</td>
<td>:</td>
<td><?php
echo $_POST["gender"]; ?></td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td><?php
echo $_POST["alamat"]; ?></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><?php
echo $_POST["email"]; ?></td>
</tr>
<tr>
<td>Website</td>
<td>:</td>
<td><?php
echo $_POST["website"]; ?></td>
</tr>
</table>
</body>
</html>
5. Simpan kedua file tersebut di C:/xampp/htdocs (tergantung letak instalasi xamppnya)
6. Buka xampp control panel, dan nyalakan apache nya
7. Selesai
Berikut hasil screenshoot nya :
~Sekian dan Terimakasih :D~
EmoticonEmoticon