【发布时间】:2018-04-28 04:47:18
【问题描述】:
<?php
$host="localhost";
$user="root";
$pwd="";
$db="assigment";
$conn=mysqli_connect($host,$user,$pwd,$db);
$query="SELECT * FROM 'tdata'";
$result=mysqli_query($conn,$query);
while ($row=mysqli_fetch($result)) {
?>
<table class="table">
<thead>
<tr>
<th>Full Name</th>
<th>Email</th>
<th>Birthday</th>
<th>Gender</th>
<th>Intrests</th>
<th>Address</th>
<th></th>
</thead>
</tr>
<tbody>
<?php echo "<tr><td>".$row[full_name]."</td></tr>";
}
?>
</tbody>
</table>
错误# 致命错误:未捕获的错误:调用 C:\xampp\htdocs\gsoft\assigment\tabledb.php:9 中的未定义函数 mysqli_fetch() 堆栈跟踪:#0 {main} 在 C:\xampp\ 中抛出htdocs\gsoft\assigment\tabledb.php 第 9 行
【问题讨论】:
标签: php error-handling while-loop