html - PHP/MYSQL Averaging each row -


i have form x amount of columns labeled c1, c2, c3..to cx. have column labeled "average" , labeled "target". "average" column finds average of each row in columns c1 - cx. possible "average" column dynamically change while user filling in form? if so, how?

if not possible, how have "average" column update value upon submitting form edited c1-cx values?

just looking tips on how deal averages. have working c1-cx columns pre-defined fields save mysql database.

add event handler triggers when of cx form field values have been changed (e.g. user changing value in it) , re-calculate average , display in average column.

probably following, assuming cx forms inputs:

document.getelementbyid("c1").addeventlistener("input", function(){     // time user changes value in form 'c1',     // function called can re-calculate     // new average , stuff... }); 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -