<h1>Matches</h1>
<?php
$con=mysqli_connect("localhost","root","","esports");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM NA");
while($row = mysqli_fetch_array($result))
{
echo $row['team1'] . " vs. " . $row['team2'];
echo "<br>";
}
mysqli_close($con);
?>
我正在尝试使用它从我的 MySQL 数据库中获取信息,然后使用 HTML 表将其显示到网页上。我对此有点陌生,那么我该怎么做呢?任何帮助表示赞赏。