<?php

require("../config/conn.php");

    $getUsers = "SELECT * FROM `users`";
    $fetchUsers = mysqli_query($conn,$getUsers);

    if($fetchUsers)
    {

        // $response['statusCode'] = 0;
        // $response['message'] = "Successful";
        while($row=$fetchUsers->fetch_assoc())
        {
            $response['data'][][] = $row;
        }


    }
    else
    {
        $response['statusCode'] = 4;
        $response['message'] = "Error in fetching users";
    }

    echo json_encode($response);

?>






