getMessage() . ' | Error Backup: ' . $e_backup->getMessage()); exit(); } } } } // SET CHARSET UTF-8 $conn->set_charset("utf8mb4"); // FUNCTION UNTUK ESCAPE INPUT function sanitize($string, $conn) { return $conn->real_escape_string(strip_tags(trim($string))); } // FUNCTION UNTUK RESPONSE JSON function sendJSON($status, $message, $data = null) { $response = [ 'status' => $status, 'message' => $message ]; if ($data !== null) { $response['data'] = $data; } echo json_encode($response, JSON_UNESCAPED_UNICODE); exit(); } ?>