Php HTML数据库中未显示的表

Php HTML数据库中未显示的表,php,html,mysql,sql,Php,Html,Mysql,Sql,我正在创建一个数据库,在创建HTML脚本时,表返回时没有boarders=Firstname Lastname” 这是我创建的代码,有人能看一下并告诉我我做错了什么吗 <?php $con=mysqli_connect("localhost","root","","Franchise_Call_Log"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysq

我正在创建一个数据库,在创建HTML脚本时,表返回时没有boarders=Firstname Lastname”

这是我创建的代码,有人能看一下并告诉我我做错了什么吗

<?php
$con=mysqli_connect("localhost","root","","Franchise_Call_Log");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con,"SELECT * FROM caller_info");

echo "<table border='1'>
<tr>
<th>Firstname</th>
<th>Lastname</th>
th>Franchise</th>
</tr>";

while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Firstname'] . "</td>";
echo "<td>" . $row['Lastname'] . "</td>";
echo "<td>" . $row['Franchise'] . "</td>";
echo "</tr>";
}
echo "</table>";

mysqli_close($con);
?> 

看看标签

<th>Franchise</th>
特许经营权

请将您的文件扩展名更改为
.php
它不会呈现您的脚本。Html文件不会呈现您的php,并按照@suhail的建议更正您的标记。

您错过了一些代码。您的文件名是什么?您在哪里运行此脚本(wamp/lamp/xammp)?将您得到的内容作为输出进行发布。我使用的是xammp,输出位于顶部,但这里又是。Firstname Lastname th>francement”;while($row=mysqli_fetch_数组($result)){echo”“;echo”“。$row['Firstname']。;echo”“。$row['Lastname']。;echo”“。$row['privation']。;echo”“;}echo”“;mysqli_close($con);?>所以您的问题是表边框没有显示,对吗?
<th>Franchise</th>