false]); exit; } $stmt = $pdo->prepare("UPDATE friends SET type = 1 WHERE from_id = ? AND to_id = ? AND type = 3"); $success = $stmt->execute([$from_id, $to_id]); echo json_encode(['success' => $success]);