Multiple checkbox answers through AJAX

I’ve got a dynamic form that allows users to vote on various issues. Up until this point, it was a single question/answer (radio buttons).
I’ve been requested to add an option to have a definable number of multiple answers (check boxes) for the questions. So far, I’ve got this working fine.
The form will show as many answers as are available, and you can pick only 2, or 3, or whatever is desired.

Each question and the associated answers are contained in an “answer_box” div like so:


<div class="question-box" id="question-82" rel="chk">
  <h2>PICK UP TO TWO ANSWERS</h2>
  <input type="checkbox" id="answer-190" name="question-82-answer_1" onclick="boxchk(this,2)" />
  <input type="checkbox" id="answer-191" name="question-82-answer_2" onclick="boxchk(this,2)" />
  <input type="checkbox" id="answer-192" name="question-82-answer_3" onclick="boxchk(this,2)" />
  <input type="checkbox" id="answer-193" name="question-82-answer_4" onclick="boxchk(this,2)" />
</div>

This works great. The problem I’m having is with the AJAX part. When recording the answers, my code only allows for a single question/answer pair, so it’s only recording the LAST answer selected inside each div.
I need to find a way to loop through the questions, then inside that loop, somehow account for multiple answers. I’m a little at a loss. Code currently looks like (I’ve cut some stuff out not needed for the post here)


$(document).ready(function(){
	$("#submit-ballot-button").bind("click", function(){
		
		// check to see if they have voted before
		$.ajax({type: "POST", url: "/validate_submission.php", data: "ballot_id="+$("#ballot-id").val()+"&user_id=<?=$_SESSION["surv_user_id"]?>",
			
			// if they haven't, record their answers now
			success: function(submission_check) {
				var errors = false;
				
				// calculate number of questions, and build an array
				var answer_array = new Array($(".question-box").size());
				for(var i = 0; i < $(".question-box").size(); i++)
				{
					answer_array[i]=new Array(2)
				}
				
				if(submission_check == "false")
				{
					var j = 0;
					$(".question-box").each(function()
					{
						var question = $(this).attr("id").substr(9);
						var rel = $(this).attr("rel");
						var answer = "";
						if(rel == "chk")
						{
							$("#"+$(this).attr("id")+" input:checked").each(function(){
								answer = $(this).attr("id").substr(7);
								
							});
						}
						else
						{
							//some error stuff here;
							}
						}
						
						if(answer == "")
						{
							errors = true;
						}
						else
						{
								answer_array[j][0] = question;
								answer_array[j][1] = answer;
								j++;
						}					
					});
					
					if(errors)
					{
						// more messages - they have to respond to all questions
					}
					else
					{
						//submit
						for(i = 0; i < answer_array.length; i++)
						{
							question = answer_array[i][0];
							answer = answer_array[i][1];
							$.ajax({type: "POST", url: "save_answer.php", data: "question_id="+question+"&answer_id="+answer+"&user_id=<?=$_SESSION["surv_user_id"]?>", success: function(answer_return){}});
						}
						$.ajax({type: "POST", url: "save_ballot_response.php", data: "ballot_id="+$("#ballot-id").val()+"&user_id=<?=$_SESSION["surv_user_id"]?>&date_completed=<?=time()?>", success: function(answer_return){window.location = "thanks.php";}});						
						
					}
				}
				else
				{
					// error messages if they've already submitted before
				}
			}});
	});
});

Suggestions?