<?php
include "../config/db.php";

$result = mysqli_query($con, "SELECT * FROM services");
?>

<h2>Services</h2>

<table border="1" cellpadding="10">

<tr>
    <th>Name</th>
    <th>Price</th>
    <th>Action</th>
</tr>

<?php while($row = mysqli_fetch_assoc($result)){ ?>

<tr>

    <td><?php echo $row['service_name']; ?></td>

    <td><?php echo $row['price']; ?></td>

    <td>
        <a href="service_edit.php?id=<?php echo $row['id']; ?>">
            Edit
        </a>
    </td>

</tr>

<?php } ?>

</table>