show_user.php
<!doctype html><html>
<head>
<meta charset="utf-8">
<title>show user </title>
</head>
<body>
<table border="1">
<tr>
<th>No.</th>
<th>id.</th>
<th>username</th>
<th>password</th>
<th>name</th>
<th>lastname</th>
<th>mobile</th>
<th>email</th>
<th>edit</th>
<th>delete</th>
</tr>
<?php
include "connect.php";
$sql="select id,username,password,name,lastname,mobile,email
from tb_user
";
$qr=$con->prepare($sql);
if($qr===false){
trigger_error("wrong sql ".$qr."error".$con->error,E_USER_ERROR);
}
$qr->execute();
$qr->bind_result($id,$username,$password,$name,$lastname,$mobile,$email);
$i=0;
while($qr->fetch()){
$i++
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $id; ?></td>
<td><?php echo $username; ?></td>
<td><?php echo $password; ?></td>
<td><?php echo $name; ?></td>
<td><?php echo $lastname ; ?></td>
<td><?php echo $mobile ; ?></td>
<td><?php echo $email ; ?></td>
<td><a href="editform.php?id=<?php echo $id; ?>">edit</a></td>
<td><a href="delete.php?id=<?php echo $id; ?>">delete</a></td>
</tr>
<?php
}
?>
</table>
</body>
</html>