Hacked By AnonymousFox
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>โปรแกรมเครื่องคิดเลข</title>
</head>
<body>
<form action="cal.php" method="post">
<table align="center" width="50%" border="2" style="border-collapse:collapse" bordercolor="#CCCCCC" cellpadding="10">
<tr>
<td bgcolor="#d9d9d9" align="center"><strong>โปรแกรมเครื่องคิดเลข</strong></td>
</tr>
<tr>
<td>ใส่ตัวเลขจำนวนที่ 1
<input type="text" name="num1" size="10"> <br>
ใส่ตัวเลขจำนวนที่ 2
<input type="text" name="num2" size="10">
<br>
<input type="checkbox" name="sign" value="+">
คลิ้กเพื่อเลือกบวกเลข
<br>
<input type="checkbox" name="sign" value="-">
คลิ้กเพื่อเลือกลบเลข <br>
<input type="checkbox" name="sign" value="*">
คลิ้กเพื่อเลือกคูณเลข<br>
<input type="checkbox" name="sign" value="/">
คลิ้กเพื่อเลือกหารเลข<br>
<input type="submit" value="แสดงผลลัพธ์">
<input type="reset" value="เคลียร์การแสดงผล">
<input type="submit" value="หาผลลัพธ์อีกครั้ง" onClick="window.location='cal.php'">
<br>
<?
$num1 = $_POST[num1];
$num2 = $_POST[num2];
$sign = $_POST[sign];
if ($sign == "+") { echo $num1+$num2; }
else if ($sign == "-") { echo $num1-$num2; }
else if ($sign == "*") { echo $num1*$num2; }
else if ($sign == "/") { echo $num1/$num2; }else{ echo "กรุณากรอกข้อมูลตัวเลขจำนวนที่ 1 / จำนวนที่ 2 และคลิ้กเลือกบวกลบคูณหารให้ครบถ้วนครับ"; }
?>
</td>
</tr>
</table>
</form>
</body>
</html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox