Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require('database.php');
- $sql = "SELECT * FROM knjige";
- mysqli_query($conn, $sql);
- $books = mysqlI_query($conn, $sql);
- ?>
- <html>
- <head>
- <title>Knjiznica boni</title>
- </head>
- <body>
- <table width="400" border="2" cellpadding="2" cellspacing='1'>
- <tr bgcolor="#2ECCFA">
- <th>Šifra</th>
- <th>Naziv</th>
- <th>Autor</th>
- </tr>
- <?php
- while ($book = $books->fetch_assoc()){
- echo "<tr>";
- echo "<td>".$book['id']."</td>";
- echo "<td>".$book['ime']."</td>";
- echo "<td>".$book['autor']."</td>";
- echo "</tr>";
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement