Last active
February 21, 2020 01:20
-
-
Save rizkiv1/de2ca0ca8c486b557adbc15c9e1e1a07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <head> | |
| <title>Konversi</title> | |
| </head> | |
| <body> | |
| <form action="index.php" method="post"> | |
| <table> | |
| <tr> | |
| <td>NIM</td> | |
| <td><input type="text" name="nim"></td> | |
| </tr> | |
| <tr> | |
| <td>Nama</td> | |
| <td><input type="text" name="nama"></td> | |
| </tr> | |
| <tr> | |
| <td>suhu Celsius</td> | |
| <td><input type="text" name="suhuCelcius"></td> | |
| </tr> | |
| <tr> | |
| <td><input type="submit" name="test" value="Proses"></td> | |
| </tr> | |
| </table> | |
| </form> | |
| <?php | |
| if(@$_POST["test"] == "Proses" ){ | |
| @$nim = $_POST["nim"]; | |
| @$nama = $_POST["nama"]; | |
| @$celcius = $_POST["suhuCelcius"]; | |
| echo "<hr>"; | |
| echo "NIM: " . $nim . "<br>Nama: " . $nama . "<br>Suhu Celsius: ".$celcius; | |
| echo "<br><br>"; | |
| @$fahrenheit = ($celcius * 9 / 5) + 32.0; | |
| @$kelvin = ($celcius + 273.15); | |
| @$reamur = $celcius * 4/5; | |
| echo "Fahrenheit: " . $fahrenheit . "<br>Kelvin: ".$kelvin."<br>Reamur: ".$reamur; | |
| } | |
| ?> | |
| <script src="" async defer></script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment