In the below code, I’m trying to access the value “balance”
from the ‘numbersdb’ database, use it in the calcs, and use
the accumulated “balance” to update the database. I could
use some help. Thanks
"; echo "
| Inv# | description | date | charges | paid | owed | bank balance |
|---|---|---|---|---|---|---|
| " . sprintf("%.2f",$balance) . " | ||||||
| ======================================================================= | ||||||
| " . $row['invnum'] . " | "; echo "" . $row['bname'] . " | "; echo "" . $row['dateord'] . " | "; echo "" . $row['charges'] . " | "; echo "" . $row['paidamt'] . " | "; echo "" . sprintf("%.2f",$owed) . " | "; echo "" . sprintf("%.2f",$nubalance) . " | "; } echo "
| ======================================================================= | "; echo "||||||
| Gtotals | "; echo ""; echo " | "; echo " | " . sprintf("%.2f",$totcharges) . " | "; echo "" . sprintf("%.2f",$totpaid) . " | "; echo "" . sprintf("%.2f",$totowed) . " | "; echo "