Reputation: 11
I am doing a reservation page where I have multiple links which redirect to a page where the reservation is made.
The link is displayed multiple times for every book in my database. It is in a while loop.
if(mysqli_num_rows($result_category) > 0) {
while($row = mysqli_fetch_assoc($result_category)) {
//... print each book then print the link to reserve
echo "<a id=\"reservelink\" href=\"viewRes.php?id=". $isbn ."\">Reserve</a><br>";
}
} else {
echo "The chosen category has no books available";
}
I tried doing the code above for each book href=\"viewRes.php?id=". $isbn ...
But when I try to echo the $isbn on viewRes page it would not be echoed. is there a way to assign each item in the database to a specific $isbn value? Thanks in advance
Upvotes: 1
Views: 110