to test this
This commit is contained in:
@@ -18,11 +18,13 @@
|
|||||||
$flag = 0;
|
$flag = 0;
|
||||||
$random = $randomArray[$i];
|
$random = $randomArray[$i];
|
||||||
$result = mysqli_query($con,"SELECT * FROM Persons WHERE num='$random'");
|
$result = mysqli_query($con,"SELECT * FROM Persons WHERE num='$random'");
|
||||||
while($row = mysqli_fetch_array($result)){
|
$row = mysqli_fetch_array($result)
|
||||||
$count += 1;
|
$count += 1;
|
||||||
echo "当前查询次数:$count, 查询行数: $random, 查询题号: $i";
|
echo "当前查询次数:$count, 查询行数: $random, 查询题号: $i";
|
||||||
//html
|
//html
|
||||||
$flag = 1;
|
if($row) {
|
||||||
|
$flag = 1;
|
||||||
|
}
|
||||||
echo "<div class=\"spbq\" name=\"div_e\"><div class=\"biankuang biankuang_1\"></div><div class=\"biankuang biankuang_2\"></div><div class=\"biankuang biankuang_3\"></div><div class=\"biankuang biankuang_4\"></div>";
|
echo "<div class=\"spbq\" name=\"div_e\"><div class=\"biankuang biankuang_1\"></div><div class=\"biankuang biankuang_2\"></div><div class=\"biankuang biankuang_3\"></div><div class=\"biankuang biankuang_4\"></div>";
|
||||||
echo "<h6 id=\"question_".$i."\">". $i. ".". $row['q'] ."</h6>\n<p>";
|
echo "<h6 id=\"question_".$i."\">". $i. ".". $row['q'] ."</h6>\n<p>";
|
||||||
echo "<input class=\"with-gap\" type=\"radio\" name=\"answer_". $i. "\" value=\"1\" id=\"test". $i. "1\" onclick=\"addOne(this)\"/>\n<label for=\"test". $i. "1\">". $row['A'] ."</label>\n";
|
echo "<input class=\"with-gap\" type=\"radio\" name=\"answer_". $i. "\" value=\"1\" id=\"test". $i. "1\" onclick=\"addOne(this)\"/>\n<label for=\"test". $i. "1\">". $row['A'] ."</label>\n";
|
||||||
@@ -33,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
echo "</p></div>\n";
|
echo "</p></div>\n";
|
||||||
echo "<div class=\"input-field col s12\" style=\"height:1px;overflow:hidden\"><input value=\"".$random."\" type=\"text\" class=\"validate\" style=\"color:#fff\" name=\"question_".$i."\"></div>\n";
|
echo "<div class=\"input-field col s12\" style=\"height:1px;overflow:hidden\"><input value=\"".$random."\" type=\"text\" class=\"validate\" style=\"color:#fff\" name=\"question_".$i."\"></div>\n";
|
||||||
}
|
|
||||||
echo $flag;
|
echo $flag;
|
||||||
if($flag == 0){
|
if($flag == 0){
|
||||||
$i--;
|
$i--;
|
||||||
|
|||||||
Reference in New Issue
Block a user