Sindbad~EG File Manager

Current Path : /home/agencxt/www/app2/
Upload File :
Current File : /home/agencxt/www/app2/fetch_types.php

<?php
include 'db.php';

if (isset($_GET['package_id'])) {
    $packageId = intval($_GET['package_id']);
    $sql = "SELECT id, nom FROM type_formule_omra WHERE formule_parent_id = $packageId";
    $result = mysqli_query($conn, $sql);

    $types = [];
    while ($row = mysqli_fetch_assoc($result)) {
        $types[] = $row;
    }
    echo json_encode($types);
}
?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists