Biodata


Rusminah, Kelas : 11 5A 07, Nim : 11092437

Senin, 19 April 2010

Hasil

TampilanInput

< !doctype html public " -//W3C//DTD HTML 4.0 //EN ">
< html>
< head>
< title>Toko Cat Guna Bangun Jaya< / title>
< / head>
< body>
< form action=" tampilanoutput.php" Method=Post>
< pre>
Nama Customer : < input type=text name=" nama" size=20 >

Alamat : < textarea rows=5 cols=20 name=" alamat">< /textarea>

Merk Cat : < select name=cbmrk>
< option value=Mowilex> Mowilex
< option value=Danapaint> Danapaint
< option value=Catylac> Catylac
< /select>

Warna : < input type=" radio" name=" warna1" value=" Merah"> Merah< input type=" radio" name=" warna2" value=" Biru">Biru< input type=" radio" name=" warna3" value=" Kuning"> Kuning

Jumlah Beli : < input type= text name=" jumbel" size=10>

< input type= submit value=" Pesan"> < input type= reset value=" Batal">
< /pre>
< /form>
< /body>
< /html>

TampilanOutput

< !doctype html public "-//W3C//DTD HTML 4.0 //EN">
< html>
< head>
< title>Data Mahasiswa Baru< /title>
< /head>
< body>
< form action="tampilaninput.php" Method=Post>
< pre>
< ?php
echo" Nama : ",$_POST["nama"];
echo" Alamat : ",$_POST["alamat"];
if ($_POST["cbmrk"]=="Mowilex")
{ $hrg=20000; }
else if($_POST["cbmrk"]=="Danapaint")
{ $hrg=30000; }
else { $hrg=40000; }
echo" Merk Cat : ", $_POST[" cbmrk"];
echo" Warna : ", $_POST[" warna1"],$_POST[" warna2"],$_POST[" warna3"];
echo" Harga : ", $hrg; echo" Jumlah Beli : ", $_POST[" jumbel"]; $total= $hrg * $_POST[" jumbel"];
echo"< br>Total Harga : ",$total;
if ($_POST["jumbel"]>=10)
{
$dis=0.1*$total;
}
else if ($_POST["jumbel"]>=5)
{
$dis= 0.03* $total;
}
else
{
$dis= 0;
}
echo"
Diskon : ", $dis;
$tobay= $total- $dis;
echo"
Total Bayar : ", $tobay;
?>
< br>
< /pre>
< /form>
< /body>
< /html>