很好的一天!我在显示表中的数据时遇到问题。我已经输入了6个数据,它将显示多少基地从我的$i++但它没有显示用户名,全名和udate。我真的很感激,谢谢你!表显示这里是我的代码:
table class="table table-striped table-sm">
<thead>
<tr>
<th>No</th>
<th>User No</th>
<th>User Name</th>
<th>Date Registered</th>
</tr>
</thead>
<tbody>
<?php
$i=0;
$uquery= mysqli_query($conn, "SELECT * FROM users");
while ($uresult=mysqli_fetch_array($uquery)){
$i++;
?>
<tr>
<td><?php echo $i;?></td>
<td><?php $uresult ['userno'];?></td>
<td><?php $uresult ['fullname'];?></td>
<td><?php $uresult ['udate'];?></td>
<?php }; ?>
</tbody>
</table>
3条答案
按热度按时间ycl3bljg1#
你忘了回显你的结果。
改变
到
或
fcy6dtqo2#
这将是你的php,调整它相应的表,希望这有帮助!
4smxwvx53#
首先,你错过了终点
</tr>
,第二,你真的必须使用变量i并增加它吗?在那里你可以回显所有的身份证?最后,你应该在变量中加上echouresult
希望这对你有帮助