Pages

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! :)

No comments:

Post a Comment

Nabung Emas dan Reksadana Rp 10.000

Doa Ruqyah Kesurupan

Doa Ruqyah Syekh Wahid Abdussalam Bali

Doa Ruqyah Ustadz Faizar

Doa Ruqyah dr. Indra Permana

Perbedaan Jumlah Fi'liyah dan Jumlah Ismiyah

Tashrif