change to local mysql

This commit is contained in:
2018-07-14 22:16:53 +08:00
parent 40af937d4c
commit 3ef62ff028
3 changed files with 5 additions and 4 deletions

View File

@@ -59,7 +59,7 @@
<div class="nav-wrapper container">
<div style="text-align:center;display:inline-block;padding:5px 0;width:100%;float:left;">本次答题结束<span name="remtime">
<?php
$con=mysqli_connect("172.27.16.2:3306","root","lxo329123456","buptStudent");
$con=mysqli_connect("127.0.0.1:3306","buptStudent","buptStudentlx","buptStudentdb");
if (!$con){echo 'Could not connect:' . mysql_error();};
$result2 = mysqli_fetch_array(mysqli_query($con,"SELECT * FROM UserAnswer WHERE Student_ID = '$_SESSION[Student_ID]'"));
if($result2[score]) echo "得分为: ".$result2[score]*5." ";
@@ -80,7 +80,7 @@
<div class="row">
<?php
//link to mysql
$con=mysqli_connect("172.27.16.2:3306","root","lxo329123456","buptStudent");
$con=mysqli_connect("127.0.0.1:3306","buptStudent","buptStudentlx","buptStudentdb");
if (!$con){echo 'Could not connect:' . mysql_error();};
//mysql_select_db("my_db_test", $con);
$p = 20;