44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
|
|
<?php
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
include('log_entry.php');
|
|
|
|
$appointment_id = $_POST['appointment_id'];
|
|
$full_name = $_POST['patient_name'];
|
|
$appointment_date = $_POST['appointment_date'];
|
|
$contact_number = $_POST['phone_no'];
|
|
$email_id = $_POST['email_id'];
|
|
$message = $_POST['appointment_message'];
|
|
$center = $_POST['center'];
|
|
$service = $_POST['service'];
|
|
$app_type= $_POST['app_type'];
|
|
$app_status= $_POST['app_status'];
|
|
// $app_type= $_POST['service'];
|
|
|
|
$time_slot='';
|
|
$time_slot =$_POST['time_slot1']." - ".$_POST['time_slot2'];
|
|
$appointment_message = $_POST['appointment_message'];
|
|
|
|
|
|
$query_initial="";
|
|
$endquery="";
|
|
begin();
|
|
if(!empty($appointment_id)){
|
|
$query_initial="update ";
|
|
$endquery=" where appointment_id = '".$appointment_id."' ";
|
|
}else{
|
|
$query_initial="insert into ";
|
|
}
|
|
|
|
|
|
$query = $query_initial." appointment_management_list set patient_name ='".$full_name."', contact_no ='".$contact_number."', email_id ='".$email_id."', appointment_date ='".$appointment_date."', appointment_center ='".$center."', appointment_service ='".$service."', message ='".$message."',app_type ='".$app_type."',app_status ='".$app_status."', appointment_time ='".$time_slot."',modified_by = '".$_SESSION['user_id']."' ".$endquery;
|
|
error_log("query".$query);
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
rollback();
|
|
exit(error_log(mysqli_error()));
|
|
}
|
|
|
|
commit();
|
|
|
|
?>
|