So i made a dynamic table and now i want to make the table rows selectable (max 1) and send the information to the next page where u can edit the phpmyadmin tablerow that you selected through the dynamic table. But only if its not too complicated, otherwise i'll just make it editable through the dynamic table itself.
This is what i got so far:
<form action="edit.php" method="post">
<div class="table">
<table cellspacing="0">
<tr class="top">
<th>Titel</th>
<th>Auteur</th>
<th>ISBN13</th>
<th>Uitgever</th>
<th>Pagina's</th>
<th>ID</th>
</tr>
<?php
$sql = "SELECT * FROM books";
$result = $conn->query($sql);
if ($result->num_rows > 0){
while($row = $result->fetch_assoc()){
?>
<tr>
<th><?php echo $row['title']; ?></th>
<th><?php echo $row['author']; ?></th>
<th><?php echo $row['isbn13']; ?></th>
<th><?php echo $row['publisher']; ?></th>
<th><?php echo $row['pages']; ?></th>
<th><?php echo $row['id']; ?></th>
</tr>
<?php
}
} else {
echo "Sorry, maar er zijn nog geen boeken in het assortiment.";
}
$conn->close();
?>
</table>
</div>
<button class="continue" type="submit">Doorgaan</button>
</form>