Why are you using textboxes? Are the values going to be sent in a form?
diafol
Keep Smiling
10,613 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57
User can edit also those text boxes and it should also calculate automatically without pressing any submit button.
Without submit will be ajax (js) - no need to involve server - use the onchange attribute (or the 'change' event of a jQuery object) to run a js function.
The submit button should then save the new values (but not the total) to the DB.
I wouldn't use a php or mysql function to total up all salaries - just use the same js totalling function on page load (e.g. document ready for jQuery).
diafol
Keep Smiling
10,613 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,506
Skill Endorsements: 57