Option A
Option B
Option C
Option D
This is a set of 4 options to a question.
We need to get the selected answer into a database
[err,result] = await to(db.query('insert into result(reg_no,q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,essay1,essay2,essay3) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)',[req.session.reg, req.body.q1.value, req.body.q2.value, req.body.q3, req.body.q4, req.body.q5, req.body.q6, req.body.q7, req.body.q8, req.body.q9, req.body.q10, req.body.essay1, req.body.essay2, req.body.essay3]));
But for no matter what option you click, you just recieve an 'ON' on the database. I want the option value to come. Eg. If i select option B, then i should have 2 in the database.