คำนวณค่า 3 ค่า
<title> ใส่ชื่อ </title>
<form id="form1" name="form1" method="post" action="var3.php">
A
<input type="text" name="A" id="A"/>
B
<input type="text" name="B" id="B"/>
C
<input type="text" name="C" id="C"/>
<input type="submit" name="submit" id="submit" value="คำนวณค่าA B C" />
</form>
<?
$A = $_POST['A'];
$B = $_POST['B'];
$C = $_POST['C'];
if($A != "" and $B !="" and $C !="")
{
$positive = $A + $B + $C;
$minus = $A - $B - $C;
$multiply = $A * $B * $C;
$divide = $A / $B / $C;
$mod = $A%$B%$C;
echo"A + B + C = $positive<br />";
echo"A - B - C= $minus<br />";
echo"A * B * C= $multiply<br />";
echo"A / B / C= $divide<br />";
echo"A % B % C= $mod<br />";
}