<?php include("includes/db.php"); include("includes/auth.php");

$res=$conn->query("
SELECT s.*,u.phone FROM subscriptions s
JOIN users u ON s.user_id=u.id
");
?>
<table border=1>
<tr><th>User</th><th>Plan</th><th>End</th></tr>
<?php while($s=$res->fetch_assoc()): ?>
<tr>
<td><?= $s['phone'] ?></td>
<td><?= $s['plan'] ?></td>
<td><?= $s['end_date'] ?></td>
</tr>
<?php endwhile; ?>
</table>
