qn1
<h1>sum of two numbers</h1>
<form method="post">
First Number :
<input type="text" name="firstnum"><br><br>
Second Number :
<input type="text" name="secondnum"><br><br>
<input type="submit" name="submit" value="sum">
</form>
<?php
if(isset($_POST['submit']))
{
$n1=$_POST['firstnum'];
$n2=$_POST['secondnum'];
$s=$n1+$n2;
echo "Sum of two numbers is ".$s;
}
?>
<p>Author : Sujit Thapa</p>

No comments: