ESH/save_appointment_slots.php
2024-10-23 18:28:06 +05:30

29 lines
941 B
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'];
if(!empty($slot_id)){
$query = "update appoinment_slots set slot = '$slot',slot_end = '$slot_end',slot_count = '$slot_count' where slot_id =
'".$slot_id."' ";
}
else {
$query = "insert into appoinment_slots(slot,slot_end,slot_count)
values ('$slot','$slot_end','$slot_count'); ";
}
if (!$result = @mysqli_query($conn,$query)) {
exit(mysqli_error($conn));
}
?>