I have a page that gets info from the database and transforms it into rows:
<?php
session_start();
$cuser = $_SESSION["username"];
$getRequests = "SELECT * FROM friends WHERE user2='$cuser' AND accepted='0'";
$query = $conn->query($getRequests);
if ($query->num_rows >= 1) {
while($row = mysqli_fetch_assoc($query)) {
echo "<div id=fRequest>";
echo "<a href='#'>".$row["user1"]."</a>";
echo "</div><br>";
echo "<a href='#'><button>Accept</button></a>", " ", "<a href='#'><button>Ignore</button></a>";
echo "<br><br>";
}
} else {
echo "You don't have any friend request :(";
}
?>
How do I pass info (from a specific row) to another page, to then run a sql script?
PS: I usually get more than 1 result from this query.