This commit is contained in:
xice09
2018-05-30 15:45:01 +08:00
parent 4815ee7832
commit dd4e3a67e5

View File

@@ -1,5 +1,5 @@
<?php
header("Content-Type: text/html;charset=utf-8");
header("Content-Type: text/html;charset=utf-8");
$userIp = $_SERVER["REMOTE_ADDR"];
$timeend = date("H:i:s");
//时间差
@@ -9,7 +9,7 @@
//link to mysql
$con = mysqli_connect("localhost","buptStudent","buptStudentlx","buptStudentdb");
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
$chongfu="SELECT Student_ID FROM UserAnswer WHERE Student_ID=$_POST[student_id]";
if(mysql_fetch_array(mysql_query($chongfu,$con))[0]==$_POST[student_id])
@@ -44,7 +44,7 @@
// mysql_query($sql3,$con);
// }
$c= "aq_".$i;
$d=$_POST[$a]+$_POST[$b]*10;
$d=$_POST[$a]+$_POST[$b]*10;
$sql5 = "UPDATE UserAnswer SET $c=$d WHERE Student_ID=$_POST[student_id]";
if (!mysql_query($sql5,$con))
{