From 2575d4a0a94d6ecd2a9f03a9789e60e386a509b1 Mon Sep 17 00:00:00 2001 From: xice09 Date: Wed, 30 May 2018 17:20:15 +0800 Subject: [PATCH] ttttt --- anser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/anser.php b/anser.php index a42d4c6..bca0140 100644 --- a/anser.php +++ b/anser.php @@ -1,4 +1,4 @@ - + @@ -75,7 +75,7 @@ $random = $randomArray[$i]; $chongfu="SELECT Student_ID FROM UserAnswer WHERE Student_ID=$_SESSION[Student_ID]"; $result2 = mysqli_query($con,"SELECT * FROM UserAnswer WHERE Student_ID = '$_SESSION[Student_ID]'"; - if(!mysqli_fetch_array(mysqli_query($con,$chongfu))[0]==$_POST[student_id]){ + if(!mysqli_fetch_array(mysqli_query($con,$chongfu))[0]==$_SESSION[student_id]){ die('请先完成问卷'); } $list = { @@ -89,7 +89,7 @@ $q = floor($row[ap_$i] / 10); $a = floor($row[ap_$i] % 10); $result = mysqli_query($con,"SELECT * FROM Persons WHERE num='$q'"); - echo "
". $i. ".". $row['q'] ."
"; + echo "
". $i. ".". $result['q'] ."
"; echo "

正确答案是: $result[$list[$result[answer]]]

你的答案是: $result[$list[$a]]

" //echo "

\n\n\n\n\n\n\n\n

\n"; }