Subject: How to calculate after calculating through POST?
Posted By: Kilbey1 Post Date: 1/12/2004 1:43:02 PM
I've got a form that essentially calculates a worker's withholdings, exemptions, etc. I have managed this through functions, but I've also done some calculations right in the form itself. It works; I get the results I want.

But now, I need to total all columns to get "TOTAL COST". How do I manage this?

Here is an example output so you can see what I'm talking about.

Example code:

<div align="right">$<?php echo number_format(GLIcalc($_POST['salary']) * 12, 2); ?></div>


Example output:

CALCULATOR RESULTS

State: CA
Salary: 5000 (assumed monthly for test purposes)

 
 Yearly Monthly Hourly
SSA $3,720.00 $310.00 $1.85
Mth-Medicare $870.00 $72.50 $0.43
Mth-SUI $2,040.00 $170.00 $1.01
G/L Ins $420.00 $35.00 $0.21
WC $1,212.00 $101.00 $0.60
FUTA $56.00 $40.00 $0.24
Retirement
 $ 1200  $ 100.00  $ 0.595238095238  
Health $ 1800  $ 150.00  $ 0.892857142857  
Vacation $ 1200 $ 100.00 $ 0.595238095238  
Total Cost



Go to topic 8422

Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963
Return to index page 962