ohctech_p8/get_document.php
Dushant Mali 899fb3e65a Upgrade 7 to 8
Upgrade 7 to 8
2024-11-02 18:03:13 +05:30

23 lines
618 B
PHP

<?php
include('includes/config/config.php');
$doc_id =$_REQUEST['doc_id'];
$query = "select * from medical_document where id = '".$doc_id."'";
if (!$result = @mysqli_query($conn,$query)) {
error_log ( "Failed to retrieve Document Exception:" . mysqli_error($conn) . " Query::: " . $query );
die(mysqli_error($conn));
}
$data = array();
if(mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
header("Content-type: " . $row["medical_doc_type"]);
echo ($row['medical_doc']);
}
}
else
{
echo "Data not found!";
}
?>