SHARE
TWEET

Untitled

Rofihimam Oct 9th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     if (isset($_POST['button'])) {
  3.     $uang = $_POST['uang'];
  4.     $mata_uang = $_POST['mata_uang'];
  5.  
  6.         if ($mata_uang == "DollarAmerika") {
  7.             $konversi = 12000;
  8.         }
  9.         elseif ($mata_uang == "DollarSingapour") {
  10.             $konversi = 7000;
  11.         }
  12.         elseif ($mata_uang == "Yen") {
  13.             $konversi = 4000;
  14.         }
  15.         else {
  16.             $konversi = 11;
  17.         }
  18.     function konversi($uang, $konversi){
  19.         return $uang / $konversi;
  20.     }
  21.  
  22.     $hasil = konversi($uang, $konversi);
  23.     }
  24. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top