prevent user ID on address bar

the link below is from one of my webpages to display specific user profile when the view button is clicked but the problem is that it displays the user id on address bar which I think is not good practice for security issues how can this be prevented but achieve the desired output?

HTML button

<button><a href="view.php?member_id=<?php echo $roww['member_id'];?>">View</a> </button>

the php code from view.php file

if (isset($_GET['snippet_id'])) {
    $snippet_id = $_GET['snippet_id'];

    try {
        $stmt = $pdo->prepare('SELECT * FROM snippets WHERE snippet_id = :id');
        $stmt->execute([':id' => $snippet_id]);
        $row = $stmt->fetch(PDO::FETCH_ASSOC);
        $count = $stmt->rowCount();
    } catch (PDOException $e) {
        echo 'Error: ' . $e->getMessage();
        exit();
    }
}