<?php
//reading the database
$conn=mysqli_connect ("localhost", "root", "");
if (!$conn) {
echo "server connction error";
}
$db_conn = mysqli_select_db($conn, "test2");
$sql = "select id, name, email, passwd from f_user";
$query = mysqli_query($conn, $sql);
?>
<table>
<tr>
<td><strong>username</strong></td>
<td><strong>email</strong></td>
<td><strong>Passwd</strong></td>
<td><strong>Action</strong></td>
</tr>
<?php
if (mysqli_num_rows($query)>=1){
while ($row=mysqli_fetch_assoc($query)){
?>
<tr>
<td><?php echo $row['name'];?></td>
<td><?php echo $row['email'];?></td>
<td><?php echo $row['passwd'];?></td>
<td><a href="edit.php?id=<?php echo $row['id'];?>"> Edit</a> I <a href
="delete.php?id=<?php echo $row['id']; ?>">Delete</a></td>
</tr>
<?php
}}
?>
</table>