php - How to connect same pages, to different data in back-end and make them work for respective data?

I have a table, on the front-end, and its contents change according to the MySQL table, that I have connected using PHP. Now, I have some action buttons in each row, but for now, let's just assume that I have only one action, that is deleting that row. Sort of like below.
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<table>
<tr>
<th>Categories</th>
<th>Actions</th>
</tr>
<tr>
<td>Category 1</td>
<td><input type="button" value="Delete"></td>
</tr>
<tr>
<td>Category 2</td>
<td><input type="button" value="Delete"></td>
</tr>
</table>
</body>
</html>
Now, in my actual code, these delete buttons will open a confirmation page. The confirmation page is actually the same, but I need to delete different categories with their respective buttons, by deleting the data in the database. How do I make that happen?
Answer
Solution:
You can add the form tag and add name and value to the delete button then retrieve it on the other page and perform respective actions on receipt of said data or value on POST/GET. Or you can use GET to send each delete value to the page without using form attributes.
Please respond with clearer info for better help/answer
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the payload is invalid.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.