28 lines
755 B
PHP
28 lines
755 B
PHP
<?php
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
|
|
$sectionIds = $_REQUEST['sectionIds'];
|
|
// $sectionIds = explode(",", $sectionIds);
|
|
|
|
$response = [];
|
|
|
|
foreach ($sectionIds as $sectionId) {
|
|
$section_param_query = "SELECT checkup_parameter_id, parameter_name FROM checkup_parameter WHERE checkup_form_section_id = '$sectionId' AND enabled = 'Y'";
|
|
|
|
error_log("query " . $section_param_query);
|
|
|
|
$result_param_query = mysqli_query($conn, $section_param_query);
|
|
|
|
$parameters = [];
|
|
|
|
while ($row_param_query = mysqli_fetch_assoc($result_param_query)) {
|
|
$parameters[] = $row_param_query;
|
|
}
|
|
|
|
$response[$sectionId] = $parameters;
|
|
}
|
|
|
|
echo json_encode($response);
|