This commit is contained in:
xice09
2018-05-31 00:40:34 +08:00
parent e8291e1a20
commit 88ced6f8ad

View File

@@ -49,8 +49,10 @@
$sql5 = "UPDATE UserAnswer SET $c=$d WHERE Student_ID=$_POST[student_id]"; $sql5 = "UPDATE UserAnswer SET $c=$d WHERE Student_ID=$_POST[student_id]";
$sql7 = "SELECT * FROM Persons WHERE num=$_POST[$b]"; $sql7 = "SELECT * FROM Persons WHERE num=$_POST[$b]";
$rowquestion = mysqli_fetch_array(mysqli_query($sql7))['answer']; $rowquestion = mysqli_fetch_array(mysqli_query($sql7))['answer'];
if($_POST[$a] == $rowquestion && $_POST[$a] >= 1) { if($_POST[$a] - $rowquestion == 0) {
$scort++; if($_POST[$a] == '1'||$_POST[$a] == '2'||$_POST[$a]=='3'||$_POST[$a]=='4'){
$scort++;
}
} }
if (!mysqli_query($con,$sql5)) if (!mysqli_query($con,$sql5))
{ {