THIS IS MY CODE
<?php
$conn=mysqli_connect('localhost','root','','admin');
$sql="SELECT * FROM admin";
$result=mysqli_query($conn,$sql);
while($row=$result->fetch_assoc())
{
$id=$row['id'];
$name=$row['name'];
$email=$row['email'];
?>
<table>
<tr><td><?php echo $id ?></td><td><?php echo $name ?></td><td><?php echo $email ?></td><td><form action="111.php" method="post"><input type="hidden" name="row_id" id="row_id"> value="<?php echo $id ?>"><input type="submit" name="edit" id="row_id" value="edit"></form></td><td><form action="111.php" method="post"><input type="submit" name="delete" value="delete"></form></td></tr>
</table>
<?php
}
?>
another php file after click button
<?php
if(isset($_POST['edit']))
{
$id=$_POST['row_id'];
echo $id;
}
if(isset($_POST['delete']))
{
$id=$_POST['row_id'];
echo $name;
}
?>
My OUTPUT IS
1 aaa aaaaa value="1">edit(button) delete(button)
2 bbb bbbbbb value="2">edit(button) delete(button)
3 ccc cccccc value="3">edit(button) delete(button)
when i click on edit button OR delete button no print the value of id MY EXPECTED OUTPUT IS
when click button only specific id print