ttttt
This commit is contained in:
@@ -63,7 +63,7 @@
|
|||||||
<?php
|
<?php
|
||||||
//link to mysql
|
//link to mysql
|
||||||
$con=mysqli_connect("localhost","buptStudent","buptStudentlx","buptStudentdb");
|
$con=mysqli_connect("localhost","buptStudent","buptStudentlx","buptStudentdb");
|
||||||
if (!$con){die('Could not connect:' . mysql_error());};
|
if (!$con){echo 'Could not connect:' . mysql_error();};
|
||||||
//mysql_select_db("my_db_test", $con);
|
//mysql_select_db("my_db_test", $con);
|
||||||
$p = 20;
|
$p = 20;
|
||||||
$pp = 0;
|
$pp = 0;
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
for($i = 1;$i <= $p;$i++){
|
for($i = 1;$i <= $p;$i++){
|
||||||
$random = $randomArray[$i];
|
$random = $randomArray[$i];
|
||||||
$chongfu="SELECT Student_ID FROM UserAnswer WHERE Student_ID=$_SESSION[Student_ID]";
|
$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]'";
|
$result2 = mysqli_query($con,"SELECT * FROM UserAnswer WHERE Student_ID = '$_SESSION[Student_ID]'");
|
||||||
if(!mysqli_fetch_array(mysqli_query($con,$chongfu))[0]==$_SESSION[student_id]){
|
if(!mysqli_fetch_array(mysqli_query($con,$chongfu))[0]==$_SESSION[student_id]){
|
||||||
echo '请先完成问卷';
|
echo '请先完成问卷';
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user