I’m currently working on a library system and I encountered a problem of mine which I’ve encoutered for the first time. When I displayed all the books that are currently in the library, I loop them to tables using php. Now, I want to pass the ISBN value of a current column to a variable and maybe use it to run a query to display information of a certain book. Below is the div part of my code.
<div class="search-result">
<table cellspacing="0">
<tr>
<th>ISBN</th>
<th>BOOK TITLE</th>
<th class="authorName">AUTHOR NAME</th>
<th>SERIES</th>
<th></th>
</tr>
<tr>
<?php
while($row = mysqli_fetch_assoc($query)){
?>
<td><?php echo $row['ISBN'] ?></td>
<td><?php echo $row['Title'] ?></td>
<td><?php echo $row['Author'] ?></td>
<td><?php echo $row['Series'] ?></td>
<td><a class="borrow-button" href="view.php">BORROW</a></td>
</tr>
<?php } ?>
</table>
</div>
I’ve not tried anyting solution because I can’t find on the internet what I’ve been looking for. I hope someone can help me