HASIL PERHITUNGAN |
Kamar |
if($tipe=="A")
{
$luas="2 x 3 m";
$harga=200000;
}
else
if($tipe=="B")
{
$luas="3 x 3 m";
$harga=250000;
}
else
if($tipe=="C")
{
$luas="4 x 3 m";
$harga=300000;
}
echo $luas;
?>
|
Rp.
echo number_format($harga,0,",","."); ?>
|
Jenis Air |
Air echo $rb_air;?> |
Rp.
if($rb_air=="PDAM")
$air=20000;
else
if($rb_air=="Tanah")
$air=15000;
echo number_format($air,0,",",".");
?>
|
if(($cb_telepon=="Y")or($cb_televisi=="Y")or($cb_komputer=="Y")or($cb_rice=="Y"))
echo"
Fasilitas-Fasilitas |
";
if($cb_telepon=="Y")
{
$telepon=20000;
echo "Telepon | Rp.".
number_format($telepon,0,",",".")." | ";
}
if($cb_televisi=="Y")
{
$televisi=30000;
echo "
Televisi | Rp.".
number_format($televisi,0,",",".")." | ";
}
if($cb_komputer=="Y")
{
$komputer=60000;
echo "
Televisi | Rp.".
number_format($televisi,0,",",".")." | ";
}
if($cb_rice=="Y")
{
$rice=5000;
echo "
Rice Cooker | Rp.".
number_format($rice,0,",",".")." | ";
}
$total=$harga+$air+$telepon+$televisi+$komputer+$rice;
echo "
TOTAL | Rp. ".
number_format($total,0,",",".")." |
";
?>
}
?>