diff --git a/test.php b/test.php index 2911d33..a9fbeb4 100644 --- a/test.php +++ b/test.php @@ -49,8 +49,8 @@ $sql5 = "UPDATE UserAnswer SET $c=$d WHERE Student_ID=$_POST[student_id]"; $sql7 = "SELECT * FROM Persons WHERE num=$_POST[$b]"; $rowquestion = mysqli_fetch_array(mysqli_query($sql7))['answer']; - if($_POST[$a] - $rowquestion == 0) { - if($_POST[$a] == '1'||$_POST[$a] == '2'||$_POST[$a]=='3'||$_POST[$a]=='4'){ + if((int)$_POST[$a] - $rowquestion == 0) { + if((int)$_POST[$a] != 0){ $scort++; } }