PHP Programing language

How can Operate a numbers for dynamically in PHP
Previous Home Next
<html>
<head>
<title>Operation Number</title>
<body>
<?php

$num1=$_POST['number1'];
$num2=$_POST['number2'];

$sum=$num1 + $num2;
$difference=$num1 - $num2;
$multi=$num1 * $num2;
$div=$num1/$num2;

echo "Sum=".$sum." <br>";
echo "Difference =".$difference." <br>";
echo "Multilpication=".$multi." <br>";
echo "Division=".$div."<br>";
?>
<form method="post" action="calculator.php">
<table>
<tr><td><input type="text" name="number1"
size="10"></td></tr>
<tr><td><input type="text" name="number2" 
size="10"></td></tr>
<tr><td><input type="submit" name="submit"
value="Calculate"></td></tr>
</table>
</form>
</body>
</head>
</html>

 

Output:

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: