beginTransaction(); $sql = "INSERT INTO chandj.logdata_menu(data) VALUES(?)"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $data, PDO::PARAM_STR); $stmh->execute(); $pdo->commit(); $response = ['status' => 'success', 'message' => 'Log recorded successfully']; echo json_encode($response, JSON_UNESCAPED_UNICODE); } catch (PDOException $Exception) { error_log("오류: " . $Exception->getMessage()); http_response_code(500); echo json_encode(['error' => $Exception->getMessage()]); } catch (Exception $e) { error_log("오류: " . $e->getMessage()); http_response_code(500); echo json_encode(['error' => $e->getMessage()]); } ?>