Skip to content
Snippets Groups Projects
Commit db0a878d authored by Dinda Yora Islami's avatar Dinda Yora Islami
Browse files

add get request from database

parent 83f71390
Branches
No related merge requests found
Pipeline #7618 failed with stages
<?php
/**
* PHP Version 7
* Mengambil seluruh konten pengumuman.
* @category Pengumuman
* @package Komunitas-PMO
* @author Putu Arya Pradipta <13515017@std.stei.itb.ac.id>
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @link http://pear.php.net/package/komunitas-pmo
*/
require 'dbConnect.php';
header('Content-Type: application/json');
$stmt = $conn->query("SELECT id_request, name, username FROM `request_user` ORDER BY `id_request`");
$count = $stmt->num_rows;
$res = array();
while ($row = $stmt->fetch_assoc()) {
$res[] = $row;
}
echo json_encode($res);
$conn->close();
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment