<?php
if(isset($_POST[‘check’])){
$n1=$_POST[‘n1’];
$n2=$_POST[‘n2’];
$ans=$n1+$n2;
echo “The sum is $ans”;
}
?>
<form action="" method="post">
<table border="1"><tr>
<td>Enter Fnumber:<input type="text" name="n1"></td>
<td>Enter Snumber:<input type="text" name="n2"></td>
<td><input type="submit" name="check"></td>
<td>the answer is $ans</td>
</tr>
</table>
</form>