I am doing a program that does some calculations and in the end generates the result assign to the variable $result
, the data is entered using a web form <form method = "POST" action = "file.php">
For example in <form>
/ web form the user can enter numbers using text fields and it submits to file.php and file.php calculates value and assign to $result
variable.
Eg.
$result = $value1 + $value2
And what I want is that in the HTML page (even if you have to reload the page) show something like:
"Your value equals 5"
Where 5 is what I left in $result
.
What I want to know is that what is the convenient / right way of displaying the results in HTML page in PHP.