<?php
if (isset($_POST['Add'])){
$a = $_POST['num1'];
$b = $_POST['num2'];
$c = $a + $b
?>
<h3> Answer is :<?php echo $c ?></h3>
<?php
}
?>
<form method="post">
<label> Enter First Number </label>
<input type="number" name="num1"/>
<br/>
<br/>
<label> Enter Second Number </label>
<input type="number" name="num2"/>
<input type="Submit" value="Add" name="Add"/>
</form>