Sorry for this total noob question. I want to have the user enter a few numbers into a form, press the submit button, then have the result displayed in a box next to the original input. I also want to separate the html and the php script in separate files so I can have several of these simple calculators on the same page, each with its own submit and clear button. Using the html form below, I can get the info into the script but I don't know how to output it back to the form. All the simple example calculators use something like echo $result which puts the output on a new page.
<FORM METHOD="POST" ACTION = "PHP/calculate.php">
<P>first_num:<INPUT TYPE="text" NAME="first_num" SIZE = 6></P>
<P>second_num:<INPUT TYPE="text" NAME="second_num" SIZE = 6></P>
<P><INPUT TYPE="submit" NAME="submit" VALUE="Calculate"></P>
<P><INPUT TYPE="reset" VALUE="Clear"></P>
</FORM>