Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2. require('database.php');
  3.  
  4. $sql = "SELECT * FROM knjige";
  5. mysqli_query($conn, $sql);
  6. $books = mysqlI_query($conn, $sql);
  7. ?>
  8.  
  9. <html>
  10. <head>
  11. <title>Knjiznica boni</title>
  12. </head>
  13. <body>
  14. <table width="400" border="2" cellpadding="2" cellspacing='1'>
  15. <tr bgcolor="#2ECCFA">
  16. <th>Šifra</th>
  17. <th>Naziv</th>
  18. <th>Autor</th>
  19. </tr>
  20.  
  21. <?php
  22. while ($book = $books->fetch_assoc()){
  23. echo "<tr>";
  24. echo "<td>".$book['id']."</td>";
  25. echo "<td>".$book['ime']."</td>";
  26. echo "<td>".$book['autor']."</td>";
  27. echo "</tr>";
  28.  
  29. }
  30. ?>
  31. </table>
  32. </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement