Latihan Pertemuan 6
yulizaina@gmail.com |
<!doctype html public "-//W3C//DTD HTML 4.0
//EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<h3>KONSER
AMAL INDAHNYA BERBAGI</h3> <br><br>
<form action =
"tampilkonser.php" method="post">
<pre>
Nama Pemesan
:<input type ="text" name="nama" size="25"
maxlength="50">
Kode Studio :<select name="studio">
<option value="Studio
1">Studio 1
<option
value="Studio 2">Studio 2
</select>
Jenis Kelas :<input type="radio"
name="jenisk" value="VIP">VIP <input
type="radio" name="jenisk" value="Festival">Festival
Jumlah Tiket
:<input type="text" name="jumltiket" size="10"
maxlength="25">
<input type="submit" name="tampil"
value="Tampil"><input type="reset"
value="Batal">
</pre>
</body>
</html>
Penasaran hasilnya kayak appa???
Tarraaaaaaaaaa..... ini diaa
yulizaina@gmail.com |
<!doctype html public "-//W3C//DTD HTML 4.0
//EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<h3>
<font="Pristina">KONSER AMAL INDAHNYA
BERBAGI</font>
</h3>
<hr>
<?php
$nama=$_POST['nama'];
$studio=$_POST['studio'];
$jenisk=$_POST['jenisk'];
$jumltiket=$_POST['jumltiket'];
if
($jenisk=="VIP")
$h = 500000;
elseif($jenisk=="Festival")
$h= 250000;
$total=$jumltiket*$h;
echo
"<pre>";
echo "Nama
Pemesan: $nama<br>";
echo "Kode
Studio : $studio<br>";
if
($studio=="Studio 1")
echo "Bintang
Tamu: Opik<br>";
elseif($studio=="Studio 2")
echo "Bintang
Tamu:Raihan<br>";
echo "Jenis
Kelas : $jenisk<br>";
echo
"Harga : $h<br>";
echo "Jumlah
Beli : $jumltiket<br>";
echo
"=================================<br>";
echo "Total
Harga : $total";
echo
"</pre>";
?>
<a
href="konser.php">Kembali Ke Awal</a>
</body>
</html>
0 komentar:
Posting Komentar