mjfroggy
05-20-2009, 07:04 AM
Ok I have a quality assurance page where I ask 10 questions.
Answers to all questions are yes, no or na. All the different questions have different points assigned to them so like question one would have 2 points if the user answers yes or n/a and of course 0 points if answer is no vs question two which may have 5 points if answer is yes or na and 0 points if answer is 0.
So my issue is as someone fills out the form I need the page to tally the points and display it on the page (I know javascript can do this) but my issue is the I also need to be able to display what answers where put in for what questions. Answers are yes, no and na . So since each question has radio clicks and when you click a yes it has a value of how many points are assigned to that answer how do I know which answer was clicked when I display the data back.
I mean if someone answers yes or na they get the same about of points. So then when I pull from a mysql database the answer that was entered to question 2 the var maybe 5 but 5 would not tell me if it was yes that was clicked or na that was clicked for that question.
So in essence I need to have my radio clicks have 2 values one that is used to enter into a mysql database and one that is used by javascript to sum up on the page. Any suggestions on how to do this?
Thanks
Answers to all questions are yes, no or na. All the different questions have different points assigned to them so like question one would have 2 points if the user answers yes or n/a and of course 0 points if answer is no vs question two which may have 5 points if answer is yes or na and 0 points if answer is 0.
So my issue is as someone fills out the form I need the page to tally the points and display it on the page (I know javascript can do this) but my issue is the I also need to be able to display what answers where put in for what questions. Answers are yes, no and na . So since each question has radio clicks and when you click a yes it has a value of how many points are assigned to that answer how do I know which answer was clicked when I display the data back.
I mean if someone answers yes or na they get the same about of points. So then when I pull from a mysql database the answer that was entered to question 2 the var maybe 5 but 5 would not tell me if it was yes that was clicked or na that was clicked for that question.
So in essence I need to have my radio clicks have 2 values one that is used to enter into a mysql database and one that is used by javascript to sum up on the page. Any suggestions on how to do this?
Thanks
