test2
This commit is contained in:
2
test.php
2
test.php
@@ -9,7 +9,7 @@
|
|||||||
//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){die('Could not connect: '.mysql_error());}
|
||||||
mysql_select_db("my_db_test", $con);
|
//mysql_select_db("my_db_test", $con);
|
||||||
//name & student_id
|
//name & student_id
|
||||||
$chongfu="SELECT Student_ID FROM UserAnswer WHERE Student_ID=$_POST[student_id]";
|
$chongfu="SELECT Student_ID FROM UserAnswer WHERE Student_ID=$_POST[student_id]";
|
||||||
if(mysql_fetch_array(mysql_query($chongfu,$con))[0]==$_POST[student_id])
|
if(mysql_fetch_array(mysql_query($chongfu,$con))[0]==$_POST[student_id])
|
||||||
|
|||||||
Reference in New Issue
Block a user