I’ve been asked to create a simple calculations page that will have simple text boxes to be filled in by the user. I want the numbers entered into the inputs to create a calculation (which I will hard code the other numbers in) that will have it’s results outputted on the next page.
It would be great if someone could show me a coded example of one text box that will save the user entry, combine that with a very basic math calculation and then output the results onto another page.
e.g
(If the user has entered 1 in the text box) + 4 then output the result on a new page.
Put your input fields in a
formand then usePOSTvariables to do your calculations with:http://www.w3schools.com/php/php_forms.asp
Simple example as u asked:
page1.php:
page2.php