Anda di halaman 1dari 3

VRY/Fajar

Form Input Toko Kue


<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<form action=kue.php method="post">
<center>...:: TOKO KUE "LALA LULU" ::... <br>
Jl. Merpati Putih No 11</center>
<br>
<hr color=#000000>
<table border=2>
<tr>
<td colspan = 3 align = center>Kategori Jenis Kue</td>
</tr>
<tr>
<td>Birthday</td>
<td>75000</td>
<td rowspan = 4>
<img src = "J0382957.jpg" width = 100 height = 100>
</td>
</tr>
<tr>
<td>Wedding Cake</td>
<td>150000</td>
</tr>
<tr>
<td>Valentine Cake</td>
<td>50000</td>
</tr>
<tr>
<td>Mothers Day Cake</td>
<td>100000</td>
</tr>
</table>
<br>
<pre>
Nama Pembeli
: <input type="text" name="np"><br>
Alamat Pembeli : <textarea rows=3 cols=30 wrap="off"
name=ap></textarea><br>
Pilih Kategori : <select name="pk">
<option value=Birthday> Birthday
</option>
<option value=Wedding> Wedding Cake
</option>
<option value=Valentine> Valentine Cake
</option>
<option value=Mothers Day> Mothers Day
Cake </option></select><br>

VRY/Fajar
Jumlah Beli
: <input type="text" name="jb">
</pre>
<hr color=#000000>
<input type="submit" name=lanjut value=Cetak>
type="reset" name=reset value=Batal>
</form>
</body>
</html>

<input

Form output Toko Kue


<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<center>...:: "TOKO KUE LALA LULU" ::... <br>
Jl. Merpati Putih No 11</center>
<br>
<hr color=#000000>
<?
$nama = $_POST['np'];
$alamat = $_POST['ap'];
$kue = $_POST['pk'];
$jumbel = $_POST['jb'];
if($kue=="Birthday")
{
$harga=75000;
}
elseif($kue=="Wedding")
{
$harga=150000;
}
elseif($kue=="Valentine")
{
$harga=50000;
}
elseif($kue=="Mothers")
{
$harga=100000;
}
$total=$jumbel*$harga;
echo "**** TERIMA KASIH *****";
echo "<p>";
echo"<pre>";
echo"Nama Konsumen
: $nama <br>";
echo"Alamat Konsumen : $alamat <br>";
echo"--------------------------------------------- <br>";

VRY/Fajar
echo"Kue Pesanan
: $kue <br>";
echo"Harga Kue
: Rp. $harga <br>";
echo"Jumlah Beli
: $jumbel <br>";
echo"--------------------------------------------- X
<br>";
echo"Total Bayar
: Rp. $total";
echo"</pre>";
?>
<hr color = #000000>
<a href = "bunga.php">ISI DATA LAGI</a>
</body>
</html>

Anda mungkin juga menyukai