Gambar 1.0 Ketika Button Proses Diclick Maka Tampil Seperti Gambar 2.0 |
Gambar 2.0 Ketika Click "Back" Maka Tampil Seperti Gambar 1.0 |
Coding/Listing Gambar 1.0 (Simpan Dengan Nama index.html) :
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>De'Green Shop</title>
</head>
<body style="background-image:url(shop1.jpg)">
<form action="cetak.php" method="post">
<h1><center><font face="Papyrus">De'Green Shop</h1></center></font>
<hr width=100% size=4 color="blue" />
<br>
<table border="1" width="500" align="center" cellspacing="1">
<tr>
<td colspan="2" align="center"><font face="papyrus"><b><i>Isi Data Shop</td></font></i></b>
</tr>
<tr>
<td width="100">Full Name</td>
<td width="200"><input type="text" name="nama" size="30">
</tr>
<tr>
<td valign="top">Shipping Addres</td>
<td><textarea rows="4" cols="25" name="alamat"></textarea></td>
</tr>
<tr>
<td>City</td>
<td><select name="kota">
<option>--Click Here--</option>
<option value="Jakarta">Jakarta</option>
<option value="Bandung">Bandung</option>
<option value="Solo">Solo</option>
</select></td>
</tr>
<tr>
<td>Zip Code</td>
<td><input type="text" name="code" size="8"></td>
</tr>
<tr>
<td>Phone Number</td>
<td><input type="text" name="telepon" size="15"></td>
</tr>
<tr>
<td valign="top">Status Customer</td>
<td><input type="radio" value="Member" name="status">Member<br>
<input type="radio" value="Non Member" name="status">Non Member
</td>
</tr>
<tr>
<td>Your Shipping Order</td>
<td><select name="order">
<option>--Click Here--</option>
<option value="Fossil Moddox Bag">Fossil Moddox Bag</option>
<option value="Fossil Kayper Wanet">Fossil Kayper Wanet</option>
<option value="Fossil Stella Watch">Fossil Stella Watch</option>
</select></td>
</tr>
<tr>
<td>Quantity</td>
<td><input type="text" size="3" name="jumbel"></td>
</tr>
<td border="0" align="center" colspan="2">
<input type="submit" value="Proses"><input type="reset" value="Cancel">
</td>
</tr>
</table>
<br><br><br><br><br><br><br><br><br>
<hr width=100% size="4" color="blue" />
<center><h5><font face="papyrus">Copyright © 2012 | Powered By Adam Khamarullah</center></font></h5>
</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>De'Green Shop</title>
</head>
<body style="background-image:url(shop1.jpg)">
<?
$nama=$_POST['nama'];
$alamat=$_POST['alamat'];
$kota=$_POST['kota'];
$code=$_POST['code'];
$telepon=$_POST['telepon'];
if($order=='Fossil Moddox Bag')
{
$harga=250000;
}
elseif($order=='Fossil Keyper Wanet')
{
$harga=350000;
}
else
{
$harga=450000;
}
if($status=='Member')
{
$diskon=10/100*$harga;
}
else
{
$diskon=0;
}
$jumbel=$_POST['jumbel'];
$total=($harga*$jumbel)-$diskon;
?>
<center><h1><font face="Papyrus">De'Green Shop</center></h1></font>
<hr width=100% size=4 color="blue" />
<pre><br>
Full Name : <?=$nama?><br>
Shipping Addres : <?=$alamat?><br>
City : <?=$kota?><br>
Zip Code : <?=$code?><br>
Phone Number : <?=$telepon?><br>
Status Customer : <?=$status?><br>
Your Shipping Order : <?=$order?><br>
Harga : Rp.<?=$harga?><br>
Quantity : <?=$jumbel?><br>
---------------------------------------------------------<br>
Diskon : Rp.<?=$diskon?><br>
Total : Rp.<?=$total?></pre>
<center><h3><a href="index.html">Back</center></h3></a>
<br><br><br><br>
<hr width=100% size=4 color=blue />
<center><h5><font face="Papyrus">Thank You Dearest For Your Shop</center></h5></font>
<center><h5><font face="Papyrus">-- Happy Shopping --</center></h5></font>
</body>
</html>
0 komentar:
Posting Komentar