mysql - variable radio button with ajax -
i have loop of multiple radio buttons in php file-
for($j=1;$j<4;$j++) { $var[$j]=$randnum[$j]; $queryques="select * quesans q_id='$var[$j]'"; $resultques=mysql_query($queryques); while($rowques=mysql_fetch_array($resultques)) { echo "<br/>".$rowques['ques']; echo "<br/>".'<input type="radio" value="hello" name="radio'.$j.'" />'.$rowques['ans_1']; echo "<br/>".'<input type="radio" value="hello" name="radio'.$j.'" />'.$rowques['ans_2']; echo "<br/>".'<input type="radio" value="hello" name="radio'.$j.'" />'.$rowques['ans_3']; echo "<br/>".'<input type="radio" value="hello" name="radio'.$j.'" />'.$rowques['ans_4']; echo "<br/>".'<input type="submit" name="button_'.$rowques['q_id'].'"value="submit" onclick="evaluation()" '; echo "<br/><br/>"; } } and evaluation() ajax request server. how make ajax request such individually detects if submit button of of radio buttons have been pressed , take value of $rowques['q_id'] performs mysql query find corresponding answer , print that. can normal post php method want happen asynchronously. help.
Comments
Post a Comment