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

30 lines
1.0 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,'Health Advice','SAVE','save_job_profile.php');
$slot_id = $_POST['slot_id'];
$slot =$_POST['slot'];
$slot_end =$_POST['slot_end'];
$slot_count =$_POST['slot_count'];
$app_type=$_POST["app_type"];
if(!empty($slot_id)){
$query = "update appoinment_slots set slot = '$slot',slot_end = '$slot_end',slot_count = '$slot_count' ,app_type = '$app_type' where slot_id =
'".$slot_id."' ";
}
else {
$query = "insert into appoinment_slots(slot,slot_end,slot_count,app_type)
values ('$slot','$slot_end','$slot_count','$app_type'); ";
}
error_log($query);
if (!$result = @mysqli_query($conn,$query)) {
exit(mysqli_error($conn));
}
?>