Contoh Script Perhitungan Matematika Dengan PHP
<html> <head> <title>Operators PHP</title> </head> <body> <h2>Contoh Penggunaan Operator pada PHP</h2> <form action="#" method="post"> <input type="text" name="operand1" value="0" /> <select name="operator"> <option value="-">pengurangan(-)</option> <option value="+">pertambahan(+)</option> <option value="/">pembagian(/)</option> <option value="*">perkalian(*)</option> <option value="%">prosentase(%)</option> </select> <input type="text" name="operand2" value="0" /> <input type="submit" name="proses" value="Proses" /> </form> <?php error_reporting(0); $hitung=$_POST['operand1'].$_POST['operator'].$_POST['operand2']; $hasil = eval("return($hitung);"); echo("Hasil Perhitungan Matematika : "); echo $hasil; ?> </body> </html>
Title: Contoh Script Perhitungan Matematika Dengan PHP
Rating: 10 out of 10 based on 24 ratings. 5 user reviews.
Writed by Indra Gunanda
Rating: 10 out of 10 based on 24 ratings. 5 user reviews.
Writed by Indra Gunanda
Komentarlah Dengan Sopan