yeaaaaaa ..到目前为止非常糟糕...我的代码无法正常工作..但是我很高兴没有错误。但是它什么也不会打印..只是空白...
$studentno = isset($_POST['studentno']);
$con=mysqli_connect("localhost","root","","student");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$con->set_charset("utf8");
$result = mysqli_query($con,"SELECT * FROM data WHERE studentno = '$studentno'");
while($row = mysqli_fetch_array($result)) {
echo "<h3> Name: ". $row['last'] . " , " . $row['first']. " ".$row['middle']. " Birthdate: ". $row['birthdate'] ." Adviser: ". $row['adviser'] ."</h3>"; //these are the fields that you have stored in your database table data
echo "<h3> StudentNo.: ". $row['studentno'] . " ". " Age: " . $row['age'] ."</h3>";
echo "<h3> Track/Strand: ". $row['track'] . " ". "</h3>";
}
mysqli_close($con);
它是脱机的……只是针对一个项目。