< !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>
Langganan:
Posting Komentar (Atom)

Tidak ada komentar:
Posting Komentar