将数据发送到没有表单的其他页面

I was informed that I can send data without a POST function. What I am trying to figure out is how I can get rid of the form around my table and send the data to my page called "edit-product".

In addition to the data, I want the user to be sent there as well, just like the form's action attribute would do.

As of now, I have it structured like this:

<?php
        $stmt = $dbc->query("SELECT `id`,`first`,`last`,`product` FROM users");
        $stmt->setFetchMode(PDO::FETCH_ASSOC);

        while($row = $stmt->fetch()) {
        ?>
        <form method="POST" action="edit-product">
            <tr>
                <td><?php echo $row['id'];?>"</td>
                <td><?php echo $row['first'];?></td>
                <td><?php echo $row['last'];?></td>
                <td><?php echo $row['product'];?></td>
                <input name="id" type="hidden" value="<?php echo $row['id'];?>" readonly>
                <input name="first" type="hidden" value="<?php echo $row['first'];?>">
                <input name="last" type="hidden" value="<?php echo $row['last'];?>">
                <input name="product" type="hidden" value="<?php echo $row['product'];?>">
                <td><input name="save" type="submit" value="Save"></td>
                <td><div class="delete-class" name="delete" id="<?php echo $row['id']; ?>">Delete</div></td>
                <td><input name="edit" type="submit" value="Edit"></td>
            </tr>
        </form>
        <?php } ?>
        </tbody>
    </table>

In my edit-product page, I receive the data like this:

$id = $_POST['id'];
$first = $_POST['first'];
$last = $_POST['last'];
$product = $_POST['product'];

How could I do this?

You can use an edit button with anchor.

  <table>
     <tbody>
     <?php
        $stmt = $dbc->query("SELECT `id`,`first`,`last`,`product` FROM users");
        $stmt->setFetchMode(PDO::FETCH_ASSOC);

        while($row = $stmt->fetch()) {
        ?>       
            <tr>
                <td><?php echo $row['id'];?>"</td>
                <td><?php echo $row['first'];?></td>
                <td><?php echo $row['last'];?></td>
                <td><?php echo $row['product'];?></td>                    
                <td><input name="save" type="submit" value="Save"></td>
                <td><div class="delete-class" name="delete" id="<?php echo $row['id']; ?>">Delete</div></td>
                <td><a href="/edit-product?id=<?php echo $row['id']; ?>&first=<?php echo $row['first'];?>&last=<?php echo $row['last'];?>&product=<?php echo $row['product'];?>">Edit</a></td>
            </tr>      
        <?php } ?>
        </tbody>
    </table>

And u can catch the url value from edit-prpduct page. like

$id = $_GET['id'];
$first = $_GET['first'];
$last = $_GET['last'];
$product = $_GET['product'];

Just try this without any form post.