What I am trying to do is to do away with the second PHP script, and display the results (of the calculations) within the same page.
I have found a bit of code which will probably do what I want, but I just need a bit of help. This is part of the code...
<FORM method="POST"> <div id="example"> <P>This text is already in the DIV</P> </div> <input type="button" name="name" value="Hello" onclick="document.getElementById('example').innerHTML='<p>Hello</p>'"> </FORM>
When this is run, it's obviouse that the text "This text is already in the DIV" will be magically replaced with "Hello".
For example, could I put all the calculations into a function or something similar, and put just the function call where the Hello is?
Or maybe there is a better or more efficient way of doing it?