As the title says.
Have been looking for solution these past 2 days,
Salary Record are pulled from database (MySql) in to PHP table (do/while loop).
- Name , Salary , OvertimePay , Subtotal , MedicalDeduct , UnionFeeDeduct , Tax , Grand Total
- Peter , 1300 , 200 , Subtotal(1500) , 100 , 100 , 50 , Grand Total(1250)
- Mary , 1200 , 200...
- Tom , 1500...
I populate the record into rows of textbox, so user can edit them to save into another table.
1. How do I calculate the Subtotal and Grand Total in each row?
What is the approach I should take?
2. How do I submit the result into new table? Can I loop the insert statement?
Any help greatly appreciated. Thanks.