From ab9618d1c473592cee67fa975621e4a6da2a4e5b Mon Sep 17 00:00:00 2001 From: xice09 Date: Wed, 30 May 2018 16:01:12 +0800 Subject: [PATCH] test it --- test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.php b/test.php index 2bc8fb6..3783c36 100644 --- a/test.php +++ b/test.php @@ -7,12 +7,12 @@ $m = floor($sec/60); $s = floor($sec%60); //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());} //mysql_select_db("my_db_test", $con); //name & 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(mysqli_fetch_array(mysql_query($chongfu,$con))[0]==$_POST[student_id]) { die('对不起,您已参与过本活动。'); }