From 88ced6f8ad763f1f51aa98a36eb45ed4fba192b3 Mon Sep 17 00:00:00 2001 From: xice09 Date: Thu, 31 May 2018 00:40:34 +0800 Subject: [PATCH] tt --- test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test.php b/test.php index c29b30e..2911d33 100644 --- a/test.php +++ b/test.php @@ -49,8 +49,10 @@ $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 && $_POST[$a] >= 1) { - $scort++; + if($_POST[$a] - $rowquestion == 0) { + if($_POST[$a] == '1'||$_POST[$a] == '2'||$_POST[$a]=='3'||$_POST[$a]=='4'){ + $scort++; + } } if (!mysqli_query($con,$sql5)) {