From 4a096000438ffc90ebec717ba4d22eb14b6cffed Mon Sep 17 00:00:00 2001 From: xice09 Date: Thu, 31 May 2018 00:47:44 +0800 Subject: [PATCH] tt --- test.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test.php b/test.php index a9fbeb4..6279f8c 100644 --- a/test.php +++ b/test.php @@ -49,7 +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((int)$_POST[$a] - $rowquestion == 0) { + echo $rowquestion.' '.(int)$_POST[$a]; + if((int)$_POST[$a] == $rowquestion ) { if((int)$_POST[$a] != 0){ $scort++; } @@ -61,8 +62,8 @@ mysqli_query($con,$sql5); } }; - $sql5 = "UPDATE UserAnswer SET score=$scort WHERE Student_ID=$_POST[student_id]"; - mysqli_query($con,$sql5); + // $sql5 = "UPDATE UserAnswer SET score=$scort WHERE Student_ID=$_POST[student_id]"; + // mysqli_query($con,$sql5); echo "提交成功。谢谢参与我们的活动,请继续关注我们公众号bupt_stu的后续推送。现在你可以直接关闭页面了。"; //match & score //$result = mysqli_query("SELECT * FROM UserAnswer WHERE Student_ID=$_POST[student_id]");