<h1>Rides</h1>

<a href="/driftly/public/admin">Back to dashboard</a>

<table border="1" cellpadding="8" cellspacing="0">
    <tr>
        <th>ID</th>
        <th>Driver</th>
        <th>From</th>
        <th>To</th>
        <th>Departure</th>
        <th>Seats</th>
        <th>Price</th>
    </tr>

    <?php foreach ($rides as $ride): ?>
        <tr>
            <td><?= htmlspecialchars($ride['id']) ?></td>
            <td><?= htmlspecialchars($ride['driver_name']) ?></td>
            <td><?= htmlspecialchars($ride['from_location']) ?></td>
            <td><?= htmlspecialchars($ride['to_location']) ?></td>
            <td><?= htmlspecialchars($ride['departure_time']) ?></td>
            <td><?= htmlspecialchars($ride['available_seats']) ?></td>
            <td><?= htmlspecialchars($ride['price']) ?></td>
        </tr>
    <?php endforeach; ?>
</table>