From d124ef69b51cf40925edbf38af04e445b79b013e Mon Sep 17 00:00:00 2001 From: xice09 Date: Thu, 31 May 2018 00:49:57 +0800 Subject: [PATCH] tt --- test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.php b/test.php index 6279f8c..cad2a87 100644 --- a/test.php +++ b/test.php @@ -47,9 +47,9 @@ $c= "aq_".$i; $d=$_POST[$a]+$_POST[$b]*10; $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']; - echo $rowquestion.' '.(int)$_POST[$a]; + echo $_POST[$a]; if((int)$_POST[$a] == $rowquestion ) { if((int)$_POST[$a] != 0){ $scort++;