<?php 
include "../config/connect.php";
include "../config/whatsapp_api.php";

$no = 1;
$tanggalHariIni = date('Y-m-d');
$sql = "SELECT * FROM data_server WHERE id != :id AND expaired_date >= :tanggal ORDER BY expaired_date DESC";
$stmt = $pdo->prepare($sql);
$stmt->execute([
    ':id' => 1,
    ':tanggal' => $tanggalHariIni
]);

while ($server = $stmt->fetch(PDO::FETCH_ASSOC)) {
    echo $no . ' => ' . $server['nama_server'] . '<br>';
    $no++;
}
?>
