38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
include('log_entry.php');
|
|
error_log("Start Printing Request Attributes");
|
|
$requestStr = "";
|
|
foreach ($_REQUEST as $key => $value) {
|
|
$requestStr .= $key . " : " . $value . "\n";
|
|
error_log($key . " : " . $value . "<br />\r\n");
|
|
}
|
|
error_log("End Printing Request Attributes");
|
|
save_log($requestStr, 'Device Result', 'Update', 'save_updated_device_result.php');
|
|
|
|
|
|
$code = $_REQUEST['code'];
|
|
$accession_number = $_REQUEST['accession_number'];
|
|
$test_result = $_REQUEST['test_result'];
|
|
$result_id = $_REQUEST['result_id'];
|
|
|
|
$data = "";
|
|
|
|
|
|
if ($code != '' && $code != null && $accession_number != '' && $accession_number != null && $test_result != null && $test_result != '') {
|
|
|
|
$query = "update device_result set test_result = '" . $test_result . "' where online_testcode = '" . trim($code) . "' and accession_number = '" . trim($accession_number) . "' and result_id = '" . $result_id . "'";
|
|
|
|
error_log("query " . $query);
|
|
|
|
if (!$result = mysqli_query($conn, $query)) {
|
|
error_log("erro " . mysqli_error($conn));
|
|
$data = "error";
|
|
} else {
|
|
$data = "success";
|
|
}
|
|
}
|
|
|
|
echo json_encode($data);
|