<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h1>Staff Details Page</h1>
    <table border="1">
        <thead>
            <tr>

                <th>Name</th>
                <th>mark1</th>
                <th>mark2</th>
                <th>action</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($users as $ur): ?>
                <tr>
                    <td><?= $ur['name'] ?></td>
                    <td><?= $ur['designation'] ?></td>
                    <td><?= $ur['salary'] ?></td>
                    <td>
                        <?php if ($ur['photo']): ?>
                            <img src="<?= base_url('uploads/' . $ur['photo']) ?>" width="80">
                        <?php else: ?>
                            No photo
                        <?php endif; ?>
                    </td>
                    <td><a href="<?= base_url('edit/') . $ur['id'] ?>">Edit</a></td>
                    <td><a href="<?= base_url('del/') . $ur['id'] ?>">Delete</a></td>
                </tr>
            <?php endforeach ?>
        </tbody>
    </table>
    <a href="<?php base_url() ?>add">add</a>

</body>

</html>