<?php
include('dbconnect.php');

// Query to fetch data
$sql = "SELECT  distinct role FROM tbl_invite_user";
$result = $conn->query($sql);

$data = [];
if ($result->num_rows > 0) {
    // Fetch the data and store it in an array
	$sl=1;
    while ($row = $result->fetch_assoc()) {
        $data[] = [$sl,$row['role']];
		$sl++;
    }
}

// Close the database connection
$conn->close();

// Return the data as JSON
echo json_encode($data);



?>
