torodre Posted October 31, 2008 Share Posted October 31, 2008 Thanks for your help. My code will print out all the questions in $row from the array into browser for all $rows or just one form $row; instead of looping through once and allowing next question to be read and responded to via radio button. For example, I would like to cycle through 60 multiple choice questions, one at a time, using a radio button for response to send response A, B, C, D. via "submit" the submit part is working connecting to database, is good, to get different tables is working; Controlling question output at just one at a time with not moving to next row in $row = mysql_fetch_array($result); is my confusion. OR prints out all question sets , 8 available, limited to 5 printed, but still not separating answer feedback. click any radio button and all questions are answered the same. /* Program: multiple_choice_test in PHP * Desc: FILE: mct-2.php ...Is an an atempt to generate multiple choice questions out of qTwo_tbl - one at a time - to be answered with a radio button response, with submit button taking information to be processed and compared to an answer data base, . Both $RadioAn "submit" button and correct answer from qTwoAn_tbl are compared and printed to page with new question . wrong answer to be $query=("INSERT INTO setTwoMiss_tbl (questionID,missedQ2) VALUES ('$questionID','$RadioAn'") or die("Couldn't execute insert query"); Does someone know how to cycle through questions using a form one at a time? Controlling question output at just one at a time, using "submit" in form to go to process answer then next question with moving to next row in $row = mysql_fetch_array($result) there are 100 questions per test db's tables: qTwo_tbl: id, questionID, question, A, B, C, D qTwoAn_tbl: id, questionID, correct setTwoMiss_tbl: id, questionID, missedQ2 There is a more expanded version of this question here: http://phpbuilder.com/board/forumdisplay.php?f=3 35 reads no feedback Thanks for your help. Link to comment https://forums.phpfreaks.com/topic/130898-looping-through-radio-forms/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.