31 lines
946 B
PHP
31 lines
946 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
$appointment_id =$_POST['appoint'];
|
|
$test_result =$_POST['test_result'];
|
|
echo $appointment_id;
|
|
echo $test_result;
|
|
|
|
|
|
$data = array();
|
|
//echo "hello";
|
|
|
|
|
|
if(!empty($appointment_id)){
|
|
$query = "update employee_appointment set attended_status='" . addslashes($_REQUEST['attendedStatus']) . "' where appointment_id = '".$appointment_id."' ";
|
|
//echo $query;
|
|
//exit;
|
|
}
|
|
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
@mysqli_query($conn,"delete from doctor_recommended_test where appointment_id= '".$appointment_id."'");
|
|
$test_array=explode(",",$_REQUEST['recommended_tests_new']);
|
|
for($i=0;$i<count($test_array);$i++){
|
|
echo $insert_query="insert into doctor_recommended_test set appointment_id= '".$appointment_id."', test_name='".$test_array[$i]."', test_result='".$_REQUEST['test_'.$i]."'";
|
|
@mysqli_query($conn,$insert_query);
|
|
}
|
|
echo json_encode($data);
|
|
|
|
?>
|