<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
$link=@mysqli_connect("localhost","root", "") or die("Không tìm thấy Sever");
mysqli_select_db($link, "webtintuc") or die("Không tìm thấy DB");
$sl="select idUser, HoTen, Username, Email from user";
$kq=mysqli_query($link,$sl);
?>
<table width="600" border="1">
<tbody>
<tr>
<th scope="col">idUser</th>
<th scope="col">HoTen</th>
<th scope="col">Username</th>
<th scope="col">Email</th>
</tr>
<?php
while($d=mysqli_fetch_array($kq))
{
?>
<tr>
<td><?php echo $d['idUser'] ?></td>
<td><?php echo $d['HoTen'] ?></td>
<td><?php echo $d['Username'] ?></td>
<td><?php echo $d['Email'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</body>
</html>
KẾT QUẢ:
0 comments:
Post a Comment