query($sql) === TRUE) { $stat="Your Service Booking has been cancelled."; $title="Cancelled Appointment"; $msg ="Your service appointment has been cancelled."; $sqlNot = "INSERT INTO aha_general_notifications (`aha_user_id`,`date_time_created`,`alert_title`,`alert_message`,`notification_type`,`read_by_user`) VALUES ('$userID','$myTimeStamp','$title','$msg','Service','0')"; if ($conn->query($sqlNot) === TRUE) { } }else{ $stat="Unable to cancel your service appointment. Please call our hotline number for assistance. Thank you!"; } } echo json_encode(["status" => "$stat"]); $conn->close(); ?>