$sql = "select * from question,answer where question.q_id = answer.q_id and q_category = '1' order by question.q_id ASC ";
$rs_show = mysql_query($sql) or die(mysql_error());
$total_mark=0;
foreach($_REQUEST['choi'] as $key=>$value){
$rs=mysql_query("select * from question where id=$key and choice='$value' ");
$total_mark+=mysql_num_rows($rs); mysql_free_result($rs);
}
ปล. ผมใช้ ตัวแปร $_REQUEST เพราะผมไม่รู้ว่า method ของ from จะใช้ GET หรือ PUT