Tugas PAW 2 Muhammad Irvine Fidellio Maiza

Link Preview : http://tugaspawirvin.000webhostapp.com/tugas_paw2.html
mail@pastecode.io avatar
unknown
html
3 years ago
3.9 kB
1
Indexable
Never
<?php
echo "<center>";
echo "<font size=8>";
echo "<b>Tiket Pesawat<br>";
echo "<hr>";
echo "<table>";
$kotatujuan=$_POST['kotatujuan'];
$kelas=$_POST['kelas'];
$jumlah=$_POST['jumlah'];
if($kotatujuan=="Bali"&&$kelas=="Ekonomi"){
	$harga=500000;
}else
if($kotatujuan=="Makassar"&&$kelas=="Ekonomi"){
	$harga=700000;
}else
if($kotatujuan=="Jakarta"&&$kelas=="Ekonomi"){
	$harga=300000;
}else
if($kotatujuan=="Bali"&&$kelas=="Bisnis"){
	$harga=600000;
}else
if($kotatujuan=="Makassar"&&$kelas=="Bisnis"){
	$harga=800000;
}else
if($kotatujuan=="Jakarta"&&$kelas=="Bisnis"){
	$harga=400000;
}else
if($kotatujuan=="Bali"&&$kelas=="Eksekutif"){
	$harga=700000;
}else
if($kotatujuan=="Makassar"&&$kelas=="Eksekutif"){
	$harga=900000;
}else
if($kotatujuan=="Jakarta"&&$kelas=="Eksekutif"){
	$harga=500000;
}else
$hargatiket=$harga;
$totalharga=$jumlah*$harga;
echo "<tr><td>Kota tujuan<td>:$kotatujuan";
echo "<tr><td>Kelas<td>:$kelas";
echo "<tr><td>Jumlah Tiket<td>:$jumlah";
echo "<tr><td colspan=3><hr>";
echo "<tr><td>Harga Tiket<td>:";
echo "Rp.".number_format($harga,2,',',',');
echo "<tr><td>Total Harga<td>";
echo "Rp.".number_format($totalharga,2,',',',');
?>

<!DOCTYPE html>
<html>
<title>Tugas Pemorograman Aplikasi Web 1 dan 2</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<style>
body,h1,h2,h3,h4,h5 {font-family: "Raleway", sans-serif}
</style>
<body class="w3-light-grey">

<div class="w3-content" style="max-width:800px">

<header class="w3-container w3-center w3-padding-32"> 
  <h1><b>Tugas Pemrograman Aplikasi Web</b></h1>
</header>

<div class="w3-row">

<div class="w3-col l8 s12">
  <!-- isi -->
  <div class="w3-card-4 w3-margin w3-white">
    <center><img src="/img/FIX (1).jpg" alt="Nature" style="width:15%"></center>
    <div class="w3-container">
      <h3><b>Biodata Mahasiswa</b></h3>
    </div>

    <div class="w3-container">
      <table>
          <tr>
            <td><b>Nama Lengkap</b></td>
            <td>: Muhammad Irvine Fidellio Maiza</td>
          </tr>
          <tr>
            <td><b>Nomor Induk Mahasiswa&nbsp;</b></td>
            <td>: 185150307111028</td>
          </tr>
          <tr>
            <td><b>Jenis Kelamin </b></td>
            <td>: Laki-laki</td>
          </tr>
          <tr>
            <td><b>Tempat & Tanggal Lahir&nbsp;</b></td>
            <td>: Medan, 12 Februari 2001</td>
          </tr>
          <tr>
            <td><b>Agama</b></td>
            <td>: Islam</td>
          </tr>
        </table></p>
      <div class="w3-row">
        <div class="w3-col m8 s12">
          <p><button class="w3-button w3-padding-large w3-white w3-border"><b>Jangan lupa makan guys!</b></button></p>
        </div>
      </div>
    </div>
  </div>
  <hr>
</div>
<div class="w3-col l4">
  <div class="w3-card w3-margin w3-margin-top">
  <img src="/img/tiket.jpg" style="width:100%">
    <div class="w3-container w3-white">
      <h4><b>Program Tiket Pesawat</b></h4>
    <form action="tugas_paw2.php" method="post">
  <center>
    <table>
      <tr><td>Kota Tujuan</td><select name="kotatujuan">
        <option>Bali
          <option>Makassar
            <option>Jakarta
              <tr><td>Kelas
        <td><input type="radio" name="kelas" value="Ekonomi">Ekonomi
        <td><input type="radio" name="kelas" value="Bisnis">Bisnis
        <td><input type="radio" name="kelas" value="Eksekutif">Eksekutif
        <tr><td>Jumlah Tiket<td><input name="jumlah" size="1">
    </table>
    <input type="submit" value="Proses">
    <input type="reset" value="Reset">
    </div>
  </div><hr>
</div>

</div><br>
</div>
</body>
</html>