Having never done anything with sessions up to this point, I finally tried it and with success to my problem:
[php]<?php
session_start(); //first I added this at the top of the page
?>[/php]
Then further down the page where the math needs to occur:
[php]<?php $_SESSION[total_due] = “$result”;
$firstnum=$_POST[‘price’]; //this number is coming from the previous page as a URL variable
$secondnum=$rs_values->Fields(‘value’); //this number is coming from the recordset on this page
$result=$firstnum - $secondnum;
print “$result”;?>[/php]
form then submits to next page to continue. There I once again added the session_start code at top of page. Then I dragged a dreamweaver session variable named total_due to the spot I wanted it to show up:
[php]<?php echo $HTTP_SESSION_VARS['total_due']; ?>[/php]
At the end I used a hidden field that was also bound to the Session variable:
[php]<?php <input name="total_due" type="hidden" id="total_due" value="<?php echo $HTTP_SESSION_VARS['total_due']; ?>">?>[/php][/php]</p>
<p>Result: the total_due showed up where I wanted on multiple pages AND ended up in the database when the form was finally submitted!<br>
Thanks to all…</p>