The output following HTML doesn't show the output of echo
from the PHP script on Firefox. What is the problem?
<!DOCTYPE html>
<html>
<body>
<form method="post">
Enter First Number:
<input type="number" name="number1" /><br><br>
Enter Second Number:
<input type="number" name="number2" /><br><br>
<input type="submit" name="submit" value="Add">
</form>
<?php
if(isset($_POST['submit']))
{
$number1 = $_POST['number1'];
$number2 = $_POST['number2'];
$sum = $number1+$number2;
echo "The sum of $number1 and $number2 is: ".$sum;
}
?>
</body>
</html>
This is the page that i see as i click on the Add button:
So basically nothing happens, and i get back to the original page.
I am using Firefox version 69.0.1 on Debian and using XAMPP as my local testing server.