ohctech_p8/get_oxy_location.php
2024-10-16 19:18:52 +05:30

21 lines
521 B
PHP

<?php
include('includes/config/config.php');
include('includes/functions.php');
include('log_entry.php');
$id = $_REQUEST['client_id'];
$client_location_options = "";
$sql = "SELECT * from oxygen_cylinder where id='" . $id . "'";
error_log($sql."dmdm");
$result = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_assoc($result)) {
$r_id = $row['id'];
$r_name = $row['loc'];
$client_location_options .= "<option selected value=$r_name>$r_name</option>";
}
echo json_encode($client_location_options);