just starting out with php...here's my situation:
1)i have 4 text fields in a form and they are in an array
2)array_sum adds the values of the fields and is supposed to display the total as a variable using echo. it does this but the total is always 0. makes sense if all the fileds are null but when i change them, the total is not being refreshed in realtime.
3)i need the total variable to update every time one of the values in the 4 fields changes in realtime, so i get a running total displayed on the page. i don't want to do this clientside with javascript.
can anyone help?
thanks
upalm
calculating question
Moderator: General Moderators
Re: calculating question
This can't be done with PHP alone, if you want PHP to do the calculation you're going to need to use AJAX, which requires Javascript to be used.