Blog | Beli Rumah | Belajar HTML dan PHP | Kontak | Gmail | Uang Adsense
Audit Sistem Informasi
Sistem Informasi (S1)
Manajemen Informatika
Komputer dan Pendidikan
Pengobatan Ruqyah
Daftar Isi | Skripsi SI | B. Arab | Sertifikat Komputer Internasional | PrivacyPolicy | Inggris Arab

Monday, October 5, 2020

DDP 6

formulir.php

<html>
<head>
<title> Formulir </title>
</head>
<body>
 <form action="rois8f.php" method="post">
 Formulir
 <table>
  <tr>
   <td> Jumlah Lembar Fotocopy </td>
   <td><input type="text" name="jumlah"></d>
  </tr>
  <tr>
  <td colspan="2"><input type="submit" name="hitung" value="Hitung"></td>
  </tr>
 </table>
 </form>
</body>
</html> 

**

hasil.php

<html>

<head>
<title>Hasil biaya </title>
</head>
<body>
Hasil Biaya <br>
<?php
 $jum = $_POST['jumlah'];
 $hasil;
 if ($jum < 100)
 {
  $tarif = 150;
                $hasil= $jum * $tarif ;
  echo "Jumlah Lembar Fotocopy = $jum <br>";
  echo "Tarif harga = $tarif <br>";
  echo "Total bayar = $hasil <br>";
 } else if ($jum < 200)
 {
  $tarif = 100;
                $hasil= $jum * $tarif ;
  echo "Jumlah Lembar Fotocopy = $jum <br>";
  echo "Tarif harga = $tarif <br>";
  echo "Biaya harus bayar = $hasil <br>";
 }else if ($jum < 200 )
 {
  $tarif = 80;
                $hasil= $jum * $tarif ;
  echo "Jumlah Lembar Fotocopy = $jum <br>";
  echo "Tarif harga = $tarif <br>";
  echo "Biaya harus bayar = $hasil <br>";
 }else{
  echo "Jumlah tidak sesuai";
 }
?>
</body>
</html>

 

* Kemungkinan muncul error saat dijalankan. Silakan edit! :)

"Investasi Emas dan Reksadana, Untung Mana?."
Youtube: Katabah Com: Menuju 1 jt Konten :)

No comments:

Post a Comment